================
@@ -142,9 +142,12 @@ static void doEnsureHipLoaded(void) {
if (pHipGetDeviceCount && pHipGetDeviceProperties) {
int Count = 0;
- if (pHipGetDeviceCount(&Count) == 0) {
- if (Count > MAX_DEVICES)
- Count = MAX_DEVICES;
+ if (pHipGetDeviceCount(&Count) == 0 && Count > 0) {
+ DeviceArchNames = (char(*)[256])calloc(Count, sizeof(*DeviceArchNames));
----------------
jhuber6 wrote:
Do we have a deinitialization phase where we can free this? If not it probably
doesn't matter that much.
https://github.com/llvm/llvm-project/pull/177665
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits