Skip to content

Update Mapping.cpp #5

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 1 commit into from
Oct 21, 2022
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions openmp/libomptarget/DeviceRTL/src/Mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ uint32_t mapping::getWarpSize() { return impl::getWarpSize(); }

uint32_t mapping::getBlockSize(bool IsSPMD) {
uint32_t BlockSize =
mapping::getNumberOfProcessorElements() - (!IsSPMD * impl::getWarpSize());
impl::getNumHardwareThreadsInBlock() - (!IsSPMD * impl::getWarpSize());
if (__teams_to_threads_ratio > 1)
BlockSize *= __teams_to_threads_ratio;
return BlockSize;
Expand Down Expand Up @@ -313,7 +313,7 @@ __attribute__((noinline)) uint32_t __kmpc_get_hardware_thread_id_in_block() {

__attribute__((noinline)) uint32_t __kmpc_get_hardware_num_threads_in_block() {
FunctionTracingRAII();
return impl::getNumHardwareThreadsInBlock();
return mapping::getNumHardwareThreadsInBlock();
}

__attribute__((noinline)) uint32_t __kmpc_get_warp_size() {
Expand Down