Skip to content

Fix cmake warnings #1342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 21, 2024
Merged

Fix cmake warnings #1342

merged 7 commits into from
Jun 21, 2024

Conversation

bartekxk
Copy link
Contributor

aosewski
aosewski previously approved these changes Jun 17, 2024
@yxsamliu
Copy link

I saw another warning caused error when I try to verify this PR using clang trunk:

In file included from /home/yaxunl/git/composable_kernel/library/src/tensor_operation_instance/gpu/image_to_column/device_image_to_column_gnwc_1d_instance.cpp:4:
In file included from /home/yaxunl/git/composable_kernel/library/include/ck/library/tensor_operation_instance/gpu/conv_tensor_rearrange/device_image_to_column_instance.hpp:6:
In file included from /home/yaxunl/git/composable_kernel/include/ck/tensor_operation/gpu/device/impl/device_image_to_column_impl.hpp:9:
In file included from /home/yaxunl/git/composable_kernel/include/ck/tensor_operation/gpu/grid/gridwise_tensor_rearrange.hpp:12:
/home/yaxunl/git/composable_kernel/include/ck/tensor_operation/gpu/block/blockwise_gemm_xdlops.hpp:343:42: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
343 | xdlops_gemm.template Run(
| ^
/home/yaxunl/git/composable_kernel/include/ck/tensor_operation/gpu/block/blockwise_gemm_xdlops.hpp:533:46: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
533 | xdlops_gemm.template Run(
| ^
/home/yaxunl/git/composable_kernel/include/ck/tensor_operation/gpu/block/blockwise_gemm_xdlops.hpp:966:42: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
966 | xdlops_gemm.template Run(
| ^

@yxsamliu
Copy link

LGTM. You may consider adding -Wno-missing-template-arg-list-after-template-kw in a separate PR.

@bartekxk bartekxk changed the title Cmake add -Wno-nvcc-compt Fix cmake warnings Jun 17, 2024
@bartekxk bartekxk force-pushed the barkocot/fix-clang-warning branch from 679b452 to 51e7025 Compare June 17, 2024 22:37
@yxsamliu
Copy link

verified with llvm trunk. build successful.

@bartekxk
Copy link
Contributor Author

verified with llvm trunk. build successful.

Thanks!

@aosewski aosewski merged commit 510325a into develop Jun 21, 2024
18 of 24 checks passed
@aosewski aosewski deleted the barkocot/fix-clang-warning branch June 21, 2024 07:48
searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Aug 22, 2024
This PR was already merged in trunk:

llvm#77359

However, it was reverted in amd-staging due
to ck issue ROCm/composable_kernel#1330

Now try relanding it in amd-staging after ck issue fixed
by

ROCm/composable_kernel#1342

Fixes: SWDEV-431838

Original commit message:

nvcc warns about the following code:

`void f();
__device__ void f() {}`

but clang does not since clang allows device function to overload host
function.

Users want clang to emit similar warning to help code to be compatible
with nvcc.

Since this may cause regression with existing code, the warning is off
by default and can be enabled by -Wnvcc-compat.

It won't cause warning in system headers, even with -Wnvcc-compat.

Change-Id: Ia370700eb3eb1b1928d04ec59e2ec63506f85545
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.

3 participants