Skip to content

Commit a6de255

Browse files
q10meta-codesync[bot]
authored andcommitted
Fix 3 broken tests caused by D100185387 (pytorch#5656)
Summary: X-link: https://github.com/facebookresearch/FBGEMM/pull/2600 Pull Request resolved: pytorch#5656 Reviewed By: henrylhtsang Differential Revision: D100487507 fbshipit-source-id: 90a1d18fdb6a2c7b971e7e7d616bec6a6290cc56
1 parent 297cab1 commit a6de255

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

fbgemm_gpu/include/fbgemm_gpu/rocm/cdna_guard.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ namespace fbgemm_gpu::rocm {
4949
static const std::unordered_set<std::string> supported_archs{
5050
"gfx942", "gfx90a", "gfx950"};
5151
int device_id = 0;
52-
HIP_CHECK(hipGetDevice(&device_id));
52+
if (hipGetDevice(&device_id) != hipSuccess) {
53+
return false;
54+
}
5355
hipDeviceProp_t dev_props;
54-
HIP_CHECK(hipGetDeviceProperties(&dev_props, device_id));
56+
if (hipGetDeviceProperties(&dev_props, device_id) != hipSuccess) {
57+
return false;
58+
}
5559
std::string gcn_arch = dev_props.gcnArchName;
5660
gcn_arch = gcn_arch.substr(0, gcn_arch.find(":"));
5761
return supported_archs.contains(gcn_arch);

0 commit comments

Comments
 (0)