Skip to content

Commit a1a0560

Browse files
authored
Remove dev-mono-linear (#81)
* Remove dev_mono_linear (followup to removal of slab_heap) * cleanup: use CHECK_HIP rather than ad-hoc error checking --------- Signed-off-by: Aurelien Bouteiller <[email protected]>
1 parent b5830a6 commit a1a0560

File tree

3 files changed

+4
-153
lines changed

3 files changed

+4
-153
lines changed

src/backend_bc.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,11 @@ namespace rocshmem {
4242
}
4343

4444
Backend::Backend(MPI_Comm comm) : heap{comm} {
45-
int num_cus{};
46-
if (hipDeviceGetAttribute(&num_cus, hipDeviceAttributeMultiprocessorCount,
47-
0)) {
48-
abort();
49-
}
50-
5145
CHECK_HIP(hipGetDevice(&hip_dev_id));
5246

47+
int num_cus{};
48+
CHECK_HIP(hipDeviceGetAttribute(&num_cus, hipDeviceAttributeMultiprocessorCount, hip_dev_id));
49+
5350
/*
5451
* Initialize 'print_lock' global and copy to the device memory space.
5552
*/

src/memory/dev_mono_linear.hpp

Lines changed: 0 additions & 144 deletions
This file was deleted.

src/rocshmem.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ rocshmem_ctx_t ROCSHMEM_HOST_CTX_DEFAULT;
7575
[[maybe_unused]] __host__ void inline library_init(MPI_Comm comm) {
7676
assert(!backend);
7777
int count = 0;
78-
if (hipGetDeviceCount(&count) != hipSuccess) {
79-
abort();
80-
}
78+
CHECK_HIP(hipGetDeviceCount(&count));
8179

8280
if (count == 0) {
8381
printf("No GPU found! \n");

0 commit comments

Comments
 (0)