Skip to content

Commit

Permalink
Use gcnArchName instead of deprecated gcnArch (#465)
Browse files Browse the repository at this point in the history
* Update deprecated gcnArch to gcnArchName

* Don't need to include string.h header

* remove extra newline

* Proper string search
  • Loading branch information
stanleytsang-amd authored Aug 17, 2023
1 parent a89f329 commit a5062ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ inline hipError_t is_sleep_scan_state_used(bool& use_sleep)
#else
const int asicRevision = 0;
#endif
use_sleep = prop.gcnArch == 908 && asicRevision < 2;
use_sleep = std::string(prop.gcnArchName).find("908") != std::string::npos && asicRevision < 2;
return hipSuccess;
}

Expand Down
4 changes: 2 additions & 2 deletions rocprim/include/rocprim/device/device_partition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ hipError_t partition_impl(void * temporary_storage,
start = std::chrono::high_resolution_clock::now();
}

if (prop.gcnArch == 908 && asicRevision < 2)
if(std::string(prop.gcnArchName).find("908") != std::string::npos && asicRevision < 2)
{
hipLaunchKernelGGL(
HIP_KERNEL_NAME(init_lookback_scan_state_kernel<offset_scan_state_with_sleep_type>),
Expand Down Expand Up @@ -284,7 +284,7 @@ hipError_t partition_impl(void * temporary_storage,

grid_size = current_number_of_blocks;

if (prop.gcnArch == 908 && asicRevision < 2)
if(std::string(prop.gcnArchName).find("908") != std::string::npos && asicRevision < 2)
{
hipLaunchKernelGGL(
HIP_KERNEL_NAME(partition_kernel<SelectMethod, OnlySelected, config>),
Expand Down
4 changes: 2 additions & 2 deletions rocprim/include/rocprim/device/device_scan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ inline auto scan_impl(void* temporary_storage,
std::cout << "items_per_block " << items_per_block << '\n';
}

if (prop.gcnArch == 908 && asicRevision < 2)
if(std::string(prop.gcnArchName).find("908") != std::string::npos && asicRevision < 2)
{
hipLaunchKernelGGL(
HIP_KERNEL_NAME(init_lookback_scan_state_kernel<scan_state_with_sleep_type>),
Expand All @@ -312,7 +312,7 @@ inline auto scan_impl(void* temporary_storage,

if(debug_synchronous) start = std::chrono::high_resolution_clock::now();
grid_size = number_of_blocks;
if (prop.gcnArch == 908 && asicRevision < 2)
if(std::string(prop.gcnArchName).find("908") != std::string::npos && asicRevision < 2)
{
hipLaunchKernelGGL(
HIP_KERNEL_NAME(
Expand Down

0 comments on commit a5062ba

Please sign in to comment.