Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

Torch needs a higher version than 1.8 #15

@Rr-shan

Description

@Rr-shan

Hi!
When I run the code, I encounter an error:
AttributeError: module 'torch.distributed' has no attribute '_all_gather_base' with code:
from apex.parallel import DistributedDataParallel as DDP
As far as i know, the _all_gather_base is a 1.10 api in pytorch.
Maybe the nvidia apex was updated that not support torch 1.8 anymore?
thanks.
Here are all the error messages:

Traceback (most recent call last):
  File "/home/***/CSC/OCR/handwritten-chinese-ocr-samples-main/main.py", line 32, in <module>
    from apex.parallel import DistributedDataParallel as DDP
  File "/data/home/***/anaconda3/envs/openvino_env/lib/python3.8/site-packages/apex/__init__.py", line 27, in <module>
    from . import transformer
  File "/data/home/***/anaconda3/envs/openvino_env/lib/python3.8/site-packages/apex/transformer/__init__.py", line 4, in <module>
    from apex.transformer import pipeline_parallel
  File "/data/home/***/anaconda3/envs/openvino_env/lib/python3.8/site-packages/apex/transformer/pipeline_parallel/__init__.py", line 1, in <module>
    from apex.transformer.pipeline_parallel.schedules import get_forward_backward_func
  File "/data/home/***/anaconda3/envs/openvino_env/lib/python3.8/site-packages/apex/transformer/pipeline_parallel/schedules/__init__.py", line 3, in <module>
    from apex.transformer.pipeline_parallel.schedules.fwd_bwd_no_pipelining import (
  File "/data/home/***/anaconda3/envs/openvino_env/lib/python3.8/site-packages/apex/transformer/pipeline_parallel/schedules/fwd_bwd_no_pipelining.py", line 10, in <module>
    from apex.transformer.pipeline_parallel.schedules.common import Batch
  File "/data/home/***/anaconda3/envs/openvino_env/lib/python3.8/site-packages/apex/transformer/pipeline_parallel/schedules/common.py", line 9, in <module>
    from apex.transformer.pipeline_parallel.p2p_communication import FutureTensor
  File "/data/home/***/anaconda3/envs/openvino_env/lib/python3.8/site-packages/apex/transformer/pipeline_parallel/p2p_communication.py", line 25, in <module>
    from apex.transformer.utils import split_tensor_into_1d_equal_chunks
  File "/data/home/***/anaconda3/envs/openvino_env/lib/python3.8/site-packages/apex/transformer/utils.py", line 11, in <module>
    torch.distributed.all_gather_into_tensor = torch.distributed._all_gather_base
AttributeError: module 'torch.distributed' has no attribute '_all_gather_base'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions