Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hipsycl-info tool #791

Merged
merged 2 commits into from
Aug 1, 2022
Merged

Add hipsycl-info tool #791

merged 2 commits into from
Aug 1, 2022

Conversation

illuhad
Copy link
Collaborator

@illuhad illuhad commented Aug 1, 2022

This adds the hipsycl-info tool to list backends, available devices and their properties. It is similar to e.g. https://github.com/illuhad/syclinfo, but additionally prints more hipSYCL-specific information. Bundling such functionality with hipSYCL is probably more convenient for users.

Sample output:

=================Backend information===================
Loaded backend 0: HIP
  Found device: 
Loaded backend 1: CUDA
  (no devices found)
Loaded backend 2: OpenMP
  Found device: hipSYCL OpenMP host device

=================Device information===================
***************** Devices for backend HIP*****************
Device 0:
 General device information:
  Name: 
  Backend: HIP
  Vendor: AMD
  Arch: gfx90c:xnack-
  Driver version: 50221152
  Is CPU: 0
  Is GPU: 1
 Default executor information:
  Is in-order queue: 1
  Is out-of-order queue: 0
  Is task graph: 0
  Number of execution lanes for kernels: 2
  Number of execution lanes for data transfers: 2
 Device support queries:
  images: 0
  error_correction: 0
  host_unified_memory: 0
  little_endian: 1
  global_mem_cache: 1
  global_mem_cache_read_only: 0
  global_mem_cache_write_only: 0
  emulated_local_memory: 0
  sub_group_independent_forward_progress: 1
  usm_device_allocations: 1
  usm_host_allocations: 1
  usm_atomic_host_allocations: 0
  usm_shared_allocations: 1
  usm_atomic_shared_allocations: 0
  usm_system_allocations: 0
  execution_timestamps: 1
 Device properties:
  max_compute_units: 7
  max_global_size0: 18446744073709550592
  max_global_size1: 18446744073709550592
  max_global_size2: 18446744073709550592
  max_group_size: 1024
  max_num_sub_groups: 16
  preferred_vector_width_char: 4
  preferred_vector_width_double: 1
  preferred_vector_width_float: 1
  preferred_vector_width_half: 2
  preferred_vector_width_int: 1
  preferred_vector_width_long: 1
  preferred_vector_width_short: 2
  native_vector_width_char: 4
  native_vector_width_double: 1
  native_vector_width_float: 1
  native_vector_width_half: 2
  native_vector_width_int: 1
  native_vector_width_long: 1
  native_vector_width_short: 2
  max_clock_speed: 1600
  max_malloc_size: 536870912
  address_bits: 64
  max_read_image_args: 0
  max_write_image_args: 0
  image2d_max_width: 0
  image2d_max_height: 0
  image3d_max_width: 0
  image3d_max_height: 0
  image3d_max_depth: 0
  image_max_buffer_size: 0
  image_max_array_size: 0
  max_samplers: 0
  max_parameter_size: 18446744073709551615
  mem_base_addr_align: 8
  global_mem_cache_line_size: 128
  global_mem_cache_size: 1048576
  global_mem_size: 536870912
  max_constant_buffer_size: 536870912
  max_constant_args: 18446744073709551615
  local_mem_size: 65536
  printf_buffer_size: 18446744073709551615
  partition_max_sub_devices: 0
  vendor_id: 1022
  sub_group_sizes: 64 


***************** Devices for backend CUDA*****************
  (no devices)


***************** Devices for backend OpenMP*****************
Device 0:
 General device information:
  Name: hipSYCL OpenMP host device
  Backend: OpenMP
  Vendor: the hipSYCL project
  Arch: <native-cpu>
  Driver version: 1.2
  Is CPU: 1
  Is GPU: 0
 Default executor information:
  Is in-order queue: 1
  Is out-of-order queue: 0
  Is task graph: 0
  Number of execution lanes for kernels: 1
  Number of execution lanes for data transfers: 1
 Device support queries:
  images: 0
  error_correction: 0
  host_unified_memory: 1
  little_endian: 1
  global_mem_cache: 1
  global_mem_cache_read_only: 0
  global_mem_cache_write_only: 0
  emulated_local_memory: 1
  sub_group_independent_forward_progress: 0
  usm_device_allocations: 1
  usm_host_allocations: 1
  usm_atomic_host_allocations: 1
  usm_shared_allocations: 1
  usm_atomic_shared_allocations: 1
  usm_system_allocations: 1
  execution_timestamps: 1
 Device properties:
  max_compute_units: 16
  max_global_size0: 18446744073709551615
  max_global_size1: 18446744073709551615
  max_global_size2: 18446744073709551615
  max_group_size: 1024
  max_num_sub_groups: 18446744073709551615
  preferred_vector_width_char: 4
  preferred_vector_width_double: 1
  preferred_vector_width_float: 1
  preferred_vector_width_half: 2
  preferred_vector_width_int: 1
  preferred_vector_width_long: 1
  preferred_vector_width_short: 2
  native_vector_width_char: 4
  native_vector_width_double: 1
  native_vector_width_float: 1
  native_vector_width_half: 2
  native_vector_width_int: 1
  native_vector_width_long: 1
  native_vector_width_short: 2
  max_clock_speed: 0
  max_malloc_size: 18446744073709551615
  address_bits: 64
  max_read_image_args: 0
  max_write_image_args: 0
  image2d_max_width: 0
  image2d_max_height: 0
  image3d_max_width: 0
  image3d_max_height: 0
  image3d_max_depth: 0
  image_max_buffer_size: 0
  image_max_array_size: 0
  max_samplers: 0
  max_parameter_size: 18446744073709551615
  mem_base_addr_align: 8
  global_mem_cache_line_size: 64
  global_mem_cache_size: 1
  global_mem_size: 18446744073709551615
  max_constant_buffer_size: 18446744073709551615
  max_constant_args: 18446744073709551615
  local_mem_size: 18446744073709551615
  printf_buffer_size: 18446744073709551615
  partition_max_sub_devices: 0
  vendor_id: 18446744073709551615
  sub_group_sizes: 1 

One issue currently is that it does not yet link against libhipSYCL-rt using rpath, so LD_LIBRARY_PATH might be required. I'll have to see if I can fix this before merging.

@illuhad illuhad force-pushed the feature/hipsycl-info branch 2 times, most recently from de2b88f to 82b9c4c Compare August 1, 2022 01:16
@illuhad illuhad merged commit 20a212c into develop Aug 1, 2022
@illuhad illuhad deleted the feature/hipsycl-info branch August 1, 2022 13:57
DieGoldeneEnte pushed a commit to DieGoldeneEnte/hipSYCL that referenced this pull request Aug 8, 2022
* Add hipsycl-info tool

* Set rpath for runtime and tools to install/lib directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant