Skip to content

Conversation

HollowMan6
Copy link
Contributor

Since currently z1.h, z2.h and z3.h are located under csrc/compile, without this patch, torch hipify will fail to identify these hipified headers on AMD platform:

In file included from torch/include/ATen/cuda/CUDAEvent.h:3,
                  from deepspeed/ops/csrc/includes/deepcompile.h:16,
                  from deepspeed/ops/csrc/compile/z1.h:6,
                  from deepspeed/ops/csrc/compile/z1_hip.cpp:7:
 torch/include/ATen/cuda/ATenCUDAGeneral.h:3:10: fatal error: cuda.h: No such file or directory
     3 | #include <cuda.h>
       |          ^~~~~~~~
 compilation terminated.

Since currently `z1.h`, `z2.h` and `z3.h` are located under
`csrc/compile`, without this patch, torch hipify will fail to
identify these hipified headers on AMD platform:

```log
In file included from torch/include/ATen/cuda/CUDAEvent.h:3,
                  from deepspeed/ops/csrc/includes/deepcompile.h:16,
                  from deepspeed/ops/csrc/compile/z1.h:6,
                  from deepspeed/ops/csrc/compile/z1_hip.cpp:7:
 torch/include/ATen/cuda/ATenCUDAGeneral.h:3:10: fatal error: cuda.h: No such file or directory
     3 | #include <cuda.h>
       |          ^~~~~~~~
 compilation terminated.
```

Signed-off-by: Hollow Man <[email protected]>
Copy link
Contributor

@tohtana tohtana 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, @HollowMan6!

@tohtana tohtana merged commit a755a9e into deepspeedai:master Jun 30, 2025
10 checks passed
lpnpcs pushed a commit to lpnpcs/DeepSpeed that referenced this pull request Jul 30, 2025
…pspeedai#7401)

Since currently `z1.h`, `z2.h` and `z3.h` are located under
`csrc/compile`, without this patch, torch hipify will fail to identify
these hipified headers on AMD platform:

```log
In file included from torch/include/ATen/cuda/CUDAEvent.h:3,
                  from deepspeed/ops/csrc/includes/deepcompile.h:16,
                  from deepspeed/ops/csrc/compile/z1.h:6,
                  from deepspeed/ops/csrc/compile/z1_hip.cpp:7:
 torch/include/ATen/cuda/ATenCUDAGeneral.h:3:10: fatal error: cuda.h: No such file or directory
     3 | #include <cuda.h>
       |          ^~~~~~~~
 compilation terminated.
```

Signed-off-by: Hollow Man <[email protected]>
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.

2 participants