370{
371 memset(dev_type_info, 0, sizeof(*dev_type_info));
373 strcpy(dev_type_info->
vendor,
"AMD/ATI");
374 strcpy(dev_type_info->
status,
"Device Initialized");
375
376#ifdef HAVE_ROCM
378 return;
379 }
380
381 int dev_count = 0;
382 hsa_status_t status = get_device_count(&dev_count);
383 if (status != HSA_STATUS_SUCCESS) {
384 if (status != HSA_STATUS_ERROR_NOT_INITIALIZED) {
385 const char *string;
386 (*hsa_status_stringPtr)(status, &string);
387 printf( "error: %s\n", string );
388 }
389 return;
390 }
392
394 fill_dev_info(arr);
395
396#ifdef HAVE_ROCM_SMI
398 fill_dev_affinity_info(arr, dev_count);
400 }
401#else
402 const char *message = "RSMI not configured, no device affinity available";
405 SUBDBG(
"Error message truncated.");
406 }
407#endif
408
411#else
412 const char *message = "ROCm not configured, no ROCm device available";
415 SUBDBG(
"Error message truncated.");
416 }
417#endif
418}
#define PAPI_DEV_TYPE_ID__ROCM
#define SUBDBG(format, args...)
#define papi_calloc(a, b)
static int unload_hsa_sym(void)
static int load_hsa_sym(void)
static int load_rsmi_sym(void)
static int unload_rsmi_sym(void)
char status[PAPI_MAX_STR_LEN]
char vendor[PAPI_MAX_STR_LEN]