Skip to content

Commit

Permalink
[Platform][Hotfix] Update to new device setup string syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
noelchalmers committed Jan 7, 2021
1 parent 4da1ef3 commit 300be72
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions libs/core/platformDeviceConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ void platform_t::DeviceConfig(){
std::string mode;

if(settings.compareSetting("THREAD MODEL", "CUDA")){
mode = "mode: 'CUDA'";
mode = "{mode: 'CUDA'}";
}
else if(settings.compareSetting("THREAD MODEL", "HIP")){
mode = "mode: 'HIP'";
mode = "{mode: 'HIP'}";
}
else if(settings.compareSetting("THREAD MODEL", "OpenCL")){
mode = "mode: 'OpenCL', platform_id : " + std::to_string(plat);
mode = "{mode: 'OpenCL', platform_id : " + std::to_string(plat) +"}";
}
else if(settings.compareSetting("THREAD MODEL", "OpenMP")){
mode = "mode: 'OpenMP'";
mode = "{mode: 'OpenMP'}";
}
else{
mode = "mode: 'Serial'";
mode = "{mode: 'Serial'}";
}

//add a device_id number for some modes
Expand Down Expand Up @@ -97,7 +97,8 @@ void platform_t::DeviceConfig(){
}

// add device_id to setup string
mode += ", device_id: " + std::to_string(device_id);
mode.pop_back();
mode += ", device_id: " + std::to_string(device_id) + "}";
}

//set number of omp threads to use
Expand Down

0 comments on commit 300be72

Please sign in to comment.