Skip to content

Commit 57c06cd

Browse files
pciolkoszdavebayer
authored andcommitted
Add sm_62 arch traits (#6772)
(cherry picked from commit 82d668b)
1 parent 4151ea4 commit 57c06cd

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

libcudacxx/include/cuda/__device/arch_id.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ enum class arch_id : int
3737
{
3838
sm_60 = 60,
3939
sm_61 = 61,
40+
sm_62 = 62,
4041
sm_70 = 70,
4142
sm_75 = 75,
4243
sm_80 = 80,
@@ -64,6 +65,7 @@ enum class arch_id : int
6465
{
6566
case ::cuda::std::to_underlying(arch_id::sm_60):
6667
case ::cuda::std::to_underlying(arch_id::sm_61):
68+
case ::cuda::std::to_underlying(arch_id::sm_62):
6769
case ::cuda::std::to_underlying(arch_id::sm_70):
6870
case ::cuda::std::to_underlying(arch_id::sm_75):
6971
case ::cuda::std::to_underlying(arch_id::sm_80):

libcudacxx/include/cuda/__device/arch_traits.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,20 @@ template <>
227227
return __traits;
228228
};
229229

230+
template <>
231+
[[nodiscard]] _CCCL_API constexpr arch_traits_t arch_traits<arch_id::sm_62>() noexcept
232+
{
233+
auto __traits = ::cuda::__common_arch_traits(arch_id::sm_62);
234+
__traits.max_shared_memory_per_multiprocessor = 64 * 1024;
235+
__traits.max_blocks_per_multiprocessor = 32;
236+
__traits.max_threads_per_multiprocessor = 2048;
237+
__traits.max_warps_per_multiprocessor = __traits.max_threads_per_multiprocessor / __traits.warp_size;
238+
__traits.max_shared_memory_per_block_optin = 48 * 1024;
239+
__traits.max_registers_per_block = 32 * 1024;
240+
241+
return __traits;
242+
};
243+
230244
template <>
231245
[[nodiscard]] _CCCL_API constexpr arch_traits_t arch_traits<arch_id::sm_70>() noexcept
232246
{
@@ -452,6 +466,8 @@ template <>
452466
return ::cuda::arch_traits<arch_id::sm_60>();
453467
case arch_id::sm_61:
454468
return ::cuda::arch_traits<arch_id::sm_61>();
469+
case arch_id::sm_62:
470+
return ::cuda::arch_traits<arch_id::sm_62>();
455471
case arch_id::sm_70:
456472
return ::cuda::arch_traits<arch_id::sm_70>();
457473
case arch_id::sm_75:

libcudacxx/test/libcudacxx/cuda/ccclrt/device/arch_id.c2h.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ C2H_CCCLRT_TEST("Architecture id", "[device]")
2929
STATIC_REQUIRE(cuda::std::is_same_v<cuda::std::underlying_type_t<cuda::arch_id>, int>);
3030
STATIC_REQUIRE(cuda::std::to_underlying(cuda::arch_id::sm_60) == 60);
3131
STATIC_REQUIRE(cuda::std::to_underlying(cuda::arch_id::sm_61) == 61);
32+
STATIC_REQUIRE(cuda::std::to_underlying(cuda::arch_id::sm_62) == 62);
3233
STATIC_REQUIRE(cuda::std::to_underlying(cuda::arch_id::sm_70) == 70);
3334
STATIC_REQUIRE(cuda::std::to_underlying(cuda::arch_id::sm_75) == 75);
3435
STATIC_REQUIRE(cuda::std::to_underlying(cuda::arch_id::sm_80) == 80);

0 commit comments

Comments
 (0)