Skip to content
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

[pre-commit.ci] pre-commit autoupdate #3248

Merged
merged 5 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ _CCCL_DEVICE static inline void cp_async_bulk(
{
// __space == space_cluster (due to parameter type constraint)
// __space == space_global (due to parameter type constraint)
NV_IF_ELSE_TARGET(NV_PROVIDES_SM_90,
(asm("cp.async.bulk.shared::cluster.global.mbarrier::complete_tx::bytes [%0], [%1], %2, [%3]; // "
"1a. unicast" : : "r"(__as_ptr_smem(__dstMem)),
"l"(__as_ptr_gmem(__srcMem)),
"r"(__size),
"r"(__as_ptr_smem(__smem_bar)) : "memory");),
(
// Unsupported architectures will have a linker error with a semi-decent error message
__cuda_ptx_cp_async_bulk_is_not_supported_before_SM_90__();));
NV_IF_ELSE_TARGET(
NV_PROVIDES_SM_90,
(asm("cp.async.bulk.shared::cluster.global.mbarrier::complete_tx::bytes [%0], [%1], %2, [%3]; // "
"1a. unicast" : : "r"(__as_ptr_smem(__dstMem)),
"l"(__as_ptr_gmem(__srcMem)),
"r"(__size),
"r"(__as_ptr_smem(__smem_bar)) : "memory");),
(
// Unsupported architectures will have a linker error with a semi-decent error message
__cuda_ptx_cp_async_bulk_is_not_supported_before_SM_90__();));
}
#endif // __cccl_ptx_isa >= 800

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ mbarrier_arrive(_CUDA_VSTD::uint64_t* __addr, const _CUDA_VSTD::uint32_t& __coun
{
NV_IF_ELSE_TARGET(
NV_PROVIDES_SM_90,
(_CUDA_VSTD::uint64_t __state; asm("mbarrier.arrive.shared::cta.b64 %0, [%1], %2; "
"// 2. " : "=l"(__state) : "r"(__as_ptr_smem(__addr)),
"r"(__count) : "memory");
(_CUDA_VSTD::uint64_t __state;
asm("mbarrier.arrive.shared::cta.b64 %0, [%1], %2; "
"// 2. " : "=l"(__state) : "r"(__as_ptr_smem(__addr)),
"r"(__count) : "memory");
miscco marked this conversation as resolved.
Show resolved Hide resolved
return __state;),
(
// Unsupported architectures will have a linker error with a semi-decent error message
Expand Down Expand Up @@ -158,12 +159,13 @@ mbarrier_arrive(sem_release_t, scope_cluster_t, space_cluster_t, _CUDA_VSTD::uin
// __sem == sem_release (due to parameter type constraint)
// __scope == scope_cluster (due to parameter type constraint)
// __space == space_cluster (due to parameter type constraint)
NV_IF_ELSE_TARGET(NV_PROVIDES_SM_90,
(asm("mbarrier.arrive.release.cluster.shared::cluster.b64 _, [%0]; "
" // 4a. " : : "r"(__as_ptr_remote_dsmem(__addr)) : "memory");),
(
// Unsupported architectures will have a linker error with a semi-decent error message
__cuda_ptx_mbarrier_arrive_is_not_supported_before_SM_90__();));
NV_IF_ELSE_TARGET(
NV_PROVIDES_SM_90,
(asm("mbarrier.arrive.release.cluster.shared::cluster.b64 _, [%0]; "
" // 4a. " : : "r"(__as_ptr_remote_dsmem(__addr)) : "memory");),
(
// Unsupported architectures will have a linker error with a semi-decent error message
__cuda_ptx_mbarrier_arrive_is_not_supported_before_SM_90__();));
}
#endif // __cccl_ptx_isa >= 800

Expand All @@ -189,13 +191,14 @@ _CCCL_DEVICE static inline void mbarrier_arrive(
// __sem == sem_release (due to parameter type constraint)
// __scope == scope_cluster (due to parameter type constraint)
// __space == space_cluster (due to parameter type constraint)
NV_IF_ELSE_TARGET(NV_PROVIDES_SM_90,
(asm("mbarrier.arrive.release.cluster.shared::cluster.b64 _, [%0], %1; "
"// 4b. " : : "r"(__as_ptr_remote_dsmem(__addr)),
"r"(__count) : "memory");),
(
// Unsupported architectures will have a linker error with a semi-decent error message
__cuda_ptx_mbarrier_arrive_is_not_supported_before_SM_90__();));
NV_IF_ELSE_TARGET(
NV_PROVIDES_SM_90,
(asm("mbarrier.arrive.release.cluster.shared::cluster.b64 _, [%0], %1; "
"// 4b. " : : "r"(__as_ptr_remote_dsmem(__addr)),
"r"(__count) : "memory");),
(
// Unsupported architectures will have a linker error with a semi-decent error message
__cuda_ptx_mbarrier_arrive_is_not_supported_before_SM_90__();));
}
#endif // __cccl_ptx_isa >= 800

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ mbarrier_arrive_no_complete(_CUDA_VSTD::uint64_t* __addr, const _CUDA_VSTD::uint
{
NV_IF_ELSE_TARGET(
NV_PROVIDES_SM_80,
(_CUDA_VSTD::uint64_t __state; asm("mbarrier.arrive.noComplete.shared.b64 %0, [%1], %2; "
"// 5. " : "=l"(__state) : "r"(__as_ptr_smem(__addr)),
"r"(__count) : "memory");
(_CUDA_VSTD::uint64_t __state;
asm("mbarrier.arrive.noComplete.shared.b64 %0, [%1], %2; "
"// 5. " : "=l"(__state) : "r"(__as_ptr_smem(__addr)),
"r"(__count) : "memory");
return __state;),
(
// Unsupported architectures will have a linker error with a semi-decent error message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,13 @@ _CCCL_DEVICE static inline void st_async(_B32* __addr, const _B32 (&__value)[4],
static_assert(sizeof(_B32) == 4, "");
NV_IF_ELSE_TARGET(
NV_PROVIDES_SM_90,
(
asm("st.async.weak.shared::cluster.mbarrier::complete_tx::bytes.v4.b32 [%0], {%1, %2, %3, %4}, [%5]; // "
"3. " : : "r"(__as_ptr_remote_dsmem(__addr)),
"r"(__as_b32(__value[0])),
"r"(__as_b32(__value[1])),
"r"(__as_b32(__value[2])),
"r"(__as_b32(__value[3])),
"r"(__as_ptr_remote_dsmem(__remote_bar)) : "memory");),
(asm("st.async.weak.shared::cluster.mbarrier::complete_tx::bytes.v4.b32 [%0], {%1, %2, %3, %4}, [%5]; // "
"3. " : : "r"(__as_ptr_remote_dsmem(__addr)),
"r"(__as_b32(__value[0])),
"r"(__as_b32(__value[1])),
"r"(__as_b32(__value[2])),
"r"(__as_b32(__value[3])),
"r"(__as_ptr_remote_dsmem(__remote_bar)) : "memory");),
(
// Unsupported architectures will have a linker error with a semi-decent error message
__cuda_ptx_st_async_is_not_supported_before_SM_90__();));
Expand Down
Loading