Skip to content

Conversation

@stas00
Copy link
Collaborator

@stas00 stas00 commented Apr 5, 2022

This is needed with pip installed torch>=1.11 and when using pre-building

It fixes:

$ python -c "import deepspeed; deepspeed.ops.op_builder.CPUAdamBuilder().load()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/mnt/nvme0/code/github/00optimize/deepspeed/deepspeed/ops/op_builder/builder.py", line 461, in load
    return importlib.import_module(self.absolute_name())
  File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 657, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 556, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1166, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /mnt/nvme0/code/github/00optimize/deepspeed/deepspeed/ops/adam/cpu_adam_op.cpython-38-x86_64-linux-gnu.so: undefined symbol: curandCreateGenerator

which I think is the cause of:

'DeepSpeedCPUAdam' object has no attribute 'ds_opt_adam'

Fixes: #1846 (for real this time)

@jeffra

@stas00 stas00 changed the title add now required curand add now required curand to solve undefined symbol: curandCreateGenerator Apr 5, 2022
@stas00 stas00 changed the title add now required curand to solve undefined symbol: curandCreateGenerator add now required -lcurand to solve undefined symbol: curandCreateGenerator Apr 5, 2022
Copy link
Collaborator

@jeffra jeffra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @stas00, this issue has been pretty annoying for folks :(

@jeffra jeffra merged commit c487372 into deepspeedai:master Apr 5, 2022
@stas00 stas00 deleted the patch-4 branch April 5, 2022 19:14
abhay-agarwal pushed a commit to abhay-agarwal/DeepSpeed that referenced this pull request May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AttributeError: 'DeepSpeedCPUAdam' object has no attribute 'ds_opt_adam'

2 participants