Skip to content

Rename .cpp file to .cu for py_itfs_cu#530

Merged
valarLip merged 3 commits intoROCm:mainfrom
xw285cornell:xdwang_rename_cu
Jun 12, 2025
Merged

Rename .cpp file to .cu for py_itfs_cu#530
valarLip merged 3 commits intoROCm:mainfrom
xw285cornell:xdwang_rename_cu

Conversation

@xw285cornell
Copy link
Contributor

The files under py_itfs_cu all reference ck headers, and therefore they cannot be compiled by the normal clang, which complains the following:

In file included from csrc/py_itfs_cu/asm_mha_varlen_bwd.cpp:8:
In file included from csrc/include/py_itfs_common.h:7:
In file included from csrc/include/aiter_hip_common.h:8:
In file included from composable_kernel/include/ck_tile/core.hpp:6:
In file included from composable_kernel/include/ck_tile/core/algorithm/cluster_descriptor.hpp:7:
In file included from composable_kernel/include/ck_tile/core/algorithm/coordinate_transform.hpp:7:
In file included from composable_kernel/include/ck_tile/core/container/multi_index.hpp:7:
In file included from composable_kernel/include/ck_tile/core/container/array.hpp:13:
In file included from composable_kernel/include/ck_tile/core/utility/functional.hpp:9:
In file included from composable_kernel/include/ck_tile/core/container/sequence.hpp:9:
composable_kernel/include/ck_tile/core/numeric/math.hpp:173:28: error: redefinition of 'max'
  173 | CK_TILE_DEVICE constexpr T max(T x, T y)
      |                            ^
composable_kernel/include/ck_tile/core/numeric/math.hpp:167:26: note: previous definition is here
  167 | CK_TILE_HOST constexpr T max(T x, T y)
      |                          ^

Our build rules uses hipclang to compile .cu files, and normal clang for .cpp files. So wondering if we can make this change to make our tools easier.

@valarLip
Copy link
Collaborator

looks ok for us

@xw285cornell
Copy link
Contributor Author

@valarLip can we merge it if it looks ok to you? :)

@valarLip
Copy link
Collaborator

yeah.. but we have wait CI finished

@xw285cornell
Copy link
Contributor Author

For sure!

@valarLip valarLip merged commit 5a222de into ROCm:main Jun 12, 2025
10 checks passed
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

Comments