experimental/rocm/rocm_driver.c
// Populates device information from the given ROCM physical device handle.
// |out_device_info| must point to valid memory and additional data will be
// appended to |buffer_ptr| and the new pointer is returned.
Populates device information from the given ROCM physical device handle.
|out_device_info| must point to valid memory and additional data will be
appended to |buffer_ptr| and the new pointer is returned.
Populates device information from the given ROCM physical device handle . |out_device_info| must point to valid memory and additional data will be appended to |buffer_ptr| and the new pointer is returned .
static uint8_t* iree_hal_rocm_populate_device_info(
    hipDevice_t device, iree_hal_rocm_dynamic_symbols_t* syms,
    uint8_t* buffer_ptr, iree_hal_device_info_t* out_device_info) {
  char device_name[IREE_MAX_ROCM_DEVICE_NAME_LENGTH];
  ROCM_IGNORE_ERROR(syms,
                    hipDeviceGetName(device_name, sizeof(device_name), device));
  memset(out_device_info, 0, sizeof(*out_device_info));
  out_device_info->device_id = (iree_hal_device_id_t)device;
  iree_string_view_t device_name_string =
      iree_make_string_view(device_name, strlen(device_name));
  buffer_ptr += iree_string_view_append_to_buffer(
      device_name_string, &out_device_info->name, (char*)buffer_ptr);
  return buffer_ptr;
}
static uint8_t * iree_hal_rocm_populate_device_info ( hipDevice_t device , iree_hal_rocm_dynamic_symbols_t * syms , uint8_t * buffer_ptr , iree_hal_device_info_t * out_device_info ) { char device_name [ IREE_MAX_ROCM_DEVICE_NAME_LENGTH ] ; ROCM_IGNORE_ERROR ( syms , hipDeviceGetName ( device_name , sizeof ( device_name ) , device ) ) ; memset ( out_device_info , 0 , sizeof ( * out_device_info ) ) ; out_device_info -> device_id = ( iree_hal_device_id_t ) device ; iree_string_view_t device_name_string = iree_make_string_view ( device_name , strlen ( device_name ) ) ; buffer_ptr += iree_string_view_append_to_buffer ( device_name_string , & out_device_info -> name , ( char * ) buffer_ptr ) ; return buffer_ptr ; }
Populates device information from the given ROCM physical device handle.
Populates device information from the given ROCM physical device handle .