Skip to content

Commit 6c4b20c

Browse files
HSA: always call hsa_shut_down().
1 parent 7ab5243 commit 6c4b20c

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/hsa_platform.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ HSAPlatform::HSAPlatform(Runtime* runtime)
253253
return;
254254
}
255255
CHECK_HSA(status, "hsa_init()");
256-
initialized_ = true;
257256

258257
uint16_t version_major, version_minor;
259258
status = hsa_system_get_info(HSA_SYSTEM_INFO_VERSION_MAJOR, &version_major);
@@ -293,8 +292,7 @@ HSAPlatform::~HSAPlatform() {
293292
}
294293
}
295294

296-
if (initialized_)
297-
hsa_shut_down();
295+
hsa_shut_down();
298296
}
299297

300298
void* HSAPlatform::alloc_hsa(int64_t size, hsa_region_t region) {

src/hsa_platform.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ class HSAPlatform : public Platform {
9898

9999
uint64_t frequency_;
100100
std::vector<DeviceData> devices_;
101-
bool initialized_;
102101

103102
void* alloc_hsa(int64_t, hsa_region_t);
104103
void* alloc_hsa(int64_t, hsa_amd_memory_pool_t);

0 commit comments

Comments
 (0)