SWDEV-494149 - Improve hipGet/Set Device

Change-Id: If8975687a3ba9caadafc48a0066f19a4ebaab9e2


[ROCm/clr commit: 6611cc015d]
This commit is contained in:
Saleel Kudchadker committed 2024-12-03 13:36:38 -05:00
1 parent 1712acdd2e
commit 957b460014
3 files changed
+25 -17

No files matched your search

+4 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc.
/* Copyright (c) 2015 - 2024 Advanced Micro Devices, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -48,10 +48,11 @@ void init(bool* status) {
}
ClPrint(amd::LOG_INFO, amd::LOG_INIT, "Direct Dispatch: %d", AMD_DIRECT_DISPATCH);
const std::vector<amd::Device*>& devices = amd::Device::getDevices(CL_DEVICE_TYPE_GPU, false);
const size_t deviceCount = devices.size();
g_devices.reserve(deviceCount); // Pre-allocate space for better performance
for (unsigned int i=0; i<devices.size(); i++) {
for (unsigned int i = 0; i < deviceCount; i++) {
// Enable active wait on the device by default
devices[i]->SetActiveWait(true);
// use the eternal contexts that already exist for new hip::Device's here