SWDEV-494149 - Improve hipGet/Set Device
Change-Id: If8975687a3ba9caadafc48a0066f19a4ebaab9e2
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user