Skip to content

Commit f4e4aad

Browse files
Added migration logic for RMA, RMA_NBI, Memory Ord, Signal & Collective ops
1 parent 7372de4 commit f4e4aad

5 files changed

Lines changed: 1387 additions & 775 deletions

File tree

clang/lib/DPCT/RuleInfra/MapNames.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,11 +907,16 @@ void MapNames::setExplicitNamespaceMap(
907907
{"cudaExternalSemaphoreHandleType",
908908
std::make_shared<TypeNameRule>(getExpNamespace() +
909909
"external_semaphore_handle_type")},
910+
// nvSHMEM
910911
{"nvshmem_team_t", std::make_shared<TypeNameRule>("ishmem_team_t")},
911912
{"nvshmem_team_config_t",
912913
std::make_shared<TypeNameRule>("ishmem_team_config_t")},
913914
{"nvshmemx_init_attr_t",
914915
std::make_shared<TypeNameRule>("ishmemx_attr_t")},
916+
{"nvshmemi_amo_t",
917+
std::make_shared<TypeNameRule>("int")},
918+
{"nvshmemi_cmp_type",
919+
std::make_shared<TypeNameRule>("int")},
915920
// ...
916921
};
917922
// SYCLcompat unsupport types
@@ -1601,6 +1606,7 @@ void MapNames::setExplicitNamespaceMap(
16011606
? getExpNamespace() +
16021607
"external_semaphore_handle_type::win32_nt_dx12_fence"
16031608
: "cudaExternalSemaphoreHandleTypeD3D12Fence")},
1609+
// nvSHMEM
16041610
{"NVSHMEM_TEAM_WORLD",
16051611
std::make_shared<EnumNameRule>("ISHMEM_TEAM_WORLD")},
16061612
{"NVSHMEM_TEAM_SHARED",
@@ -1611,6 +1617,22 @@ void MapNames::setExplicitNamespaceMap(
16111617
std::make_shared<EnumNameRule>("ISHMEMX_RUNTIME_MPI")},
16121618
{"NVSHMEMX_INIT_WITH_SHMEM",
16131619
std::make_shared<EnumNameRule>("ISHMEMX_RUNTIME_OPENSHMEM")},
1620+
{"NVSHMEM_SIGNAL_SET",
1621+
std::make_shared<EnumNameRule>("ISHMEM_SIGNAL_SET")},
1622+
{"NVSHMEM_SIGNAL_ADD",
1623+
std::make_shared<EnumNameRule>("ISHMEM_SIGNAL_ADD")},
1624+
{"NVSHMEM_CMP_EQ",
1625+
std::make_shared<EnumNameRule>("ISHMEM_CMP_EQ")},
1626+
{"NVSHMEM_CMP_NE",
1627+
std::make_shared<EnumNameRule>("ISHMEM_CMP_NE")},
1628+
{"NVSHMEM_CMP_GT",
1629+
std::make_shared<EnumNameRule>("ISHMEM_CMP_GT")},
1630+
{"NVSHMEM_CMP_GE",
1631+
std::make_shared<EnumNameRule>("ISHMEM_CMP_GE")},
1632+
{"NVSHMEM_CMP_LT",
1633+
std::make_shared<EnumNameRule>("ISHMEM_CMP_LT")},
1634+
{"NVSHMEM_CMP_LE",
1635+
std::make_shared<EnumNameRule>("ISHMEM_CMP_LE")},
16141636
// ...
16151637
};
16161638

clang/lib/DPCT/RulesLang/RulesLang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ void TypeInDeclRule::registerMatcher(MatchFinder &MF) {
348348
"cudaGraphicsRegisterFlags", "cudaExternalMemoryHandleType",
349349
"cudaExternalSemaphoreHandleType", "CUstreamCallback",
350350
"cudaHostFn_t", "__nv_half2", "__nv_half",
351-
"cudaGraphNodeType"))))))
351+
"cudaGraphNodeType", "nvshmemi_amo_t", "nvshmemi_cmp_type"))))))
352352
.bind("cudaTypeDef"),
353353
this);
354354

0 commit comments

Comments
 (0)