Skip to content

Commit

Permalink
[SYCLomatic] Add migration support for CU_CTX_LMEM_RESIZE_TO_MAX (#2604)
Browse files Browse the repository at this point in the history
  • Loading branch information
the-slow-one authored Jan 8, 2025
1 parent 2d6ce23 commit a211e96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/DPCT/RuleInfra/MapNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1157,10 +1157,10 @@ void MapNames::setExplicitNamespaceMap(
{"CU_DEVICE_ATTRIBUTE_MAX_PITCH",
std::make_shared<EnumNameRule>("get_max_pitch",
HelperFeatureEnum::device_ext)},
{"CU_CTX_LMEM_RESIZE_TO_MAX", std::make_shared<EnumNameRule>("0")},
{"CU_CTX_MAP_HOST", std::make_shared<EnumNameRule>("0")},
{"CU_CTX_SCHED_BLOCKING_SYNC", std::make_shared<EnumNameRule>("0")},
{"CU_CTX_SCHED_SPIN", std::make_shared<EnumNameRule>("0")},
{"CU_CTX_SCHED_SPIN", std::make_shared<EnumNameRule>("0")},
{"CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK",
std::make_shared<EnumNameRule>("get_device_info().get_local_mem_size",
HelperFeatureEnum::device_ext)},
Expand Down
2 changes: 2 additions & 0 deletions clang/test/dpct/driver_device.cu
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ int main(){
flags += CU_CTX_SCHED_BLOCKING_SYNC;
// CHECK: flags += 0;
flags += CU_CTX_SCHED_SPIN;
// CHECK: flags |= 0;
flags |= CU_CTX_LMEM_RESIZE_TO_MAX;
if (cuCtxCreate(&context, flags, device) == CUDA_SUCCESS) {
return 0;
}
Expand Down

0 comments on commit a211e96

Please sign in to comment.