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

On Arm platform tests for group functions failed when targeting omp.accelerated #1431

Open
ouankou opened this issue Apr 6, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@ouankou
Copy link

ouankou commented Apr 6, 2024

Bug summary
Acpp can be built without issue on Oracle A1 VPS (4-core Ampere Altra chip). However, the built-in tests for group functions all failed.
I saw this issue related to Arm: #1044
It seems acpp has been tested on Arm. I'm wondering if I didn't set up acpp correctly.

To Reproduce

# build acpp and builtin tests
./sycl_tests --run_test=group_functions_tests

Expected behavior

All tests should pass.

Describe your setup

CPU: Ampere Altra (Arm Neoverse-N1, 4 cores)
RAM: 24 GB
OS: Debian 12
Software: Boost 1.74, Python 3.11

  • how you have installed AdaptiveCpp, and which version/branch/git commit:
    Build from source in GitHub repo develop branch
  • Describe the dependencies that AdaptiveCpp sits on top of in your setup:
    • clang version and how clang was installed:
      Clang/LLVM 17.0.6 from official LLVM apt repo.
    • host compiler:
      GCC 12.2 from official Debian repo
    • CUDA version (if applicable)
    • ROCm version and how ROCm was installed (if applicable)
  • How you have compiled your application and which arguments you have passed to acpp. In particular, which backends and hardware you have compiled for:
cmake -DWITH_SSCP_COMPILER=OFF -DWITH_ACCELERATED_CPU=ON -DWITH_OPENCL_BACKEND=OFF -DCMAKE_INSTALL_PREFIX=$HOME/Projects/AdaptiveCpp/install -DWITH_CUDA_BACKEND=OFF -DWITH_ROCM_BACKEND=OFF -DWITH_LEVEL_ZERO_BACKEND=OFF -DDEFAULT_TARGETS='omp.accelerated' ..

Optional additional diagnostic information
The following information can potentially help us:

  • For compilation/toolchain or setup-related issues: Setting the environment variable HIPSYCL_DRYRUN=1 during compilation will cause syclcc to print the commands it would execute instead of actually executing. This can help verify the sanity of your setup.
  • syclcc --hipsycl-version prints information about the AdaptiveCpp configuration that may be interesting for setup-related issues.
acpp warning: syclcc is deprecated; please use acpp instead.
acpp [AdaptiveCpp compilation driver], Copyright (C) 2018-2023 Aksel Alpay and the AdaptiveCpp project
  AdaptiveCpp version: 24.02.0+git.0359cac9.20240401.branch.develop.dirty
  Installation root: /home/ouankou/Projects/AdaptiveCpp/install
  Plugin LLVM version: 17, can accelerate CPU: True
  Available runtime backends:
     librt-backend-omp.so


Full configuration [can be overridden using environment variables or command line arguments]:
    version-major: 24
    version-minor: 02
    version-patch: 0
    version-suffix: +git.0359cac9.20240401.branch.develop.dirty
    plugin-llvm-version-major: 17
    plugin-with-cpu-acceleration: true
    default-clang: /usr/lib/llvm-17/bin/clang++
    default-targets: omp.accelerated
    default-cpu-cxx: /usr/bin/c++
    default-rocm-path: /opt/rocm
    default-use-bootstrap-mode: false
    default-is-dryrun: false
    default-use-accelerated-cpu: true
    default-clang-include-path: /usr/lib/llvm-17/lib/clang/17/include/..
    default-sequential-link-line: -L/usr/lib/aarch64-linux-gnu -lboost_context -lboost_fiber -Wl,-rpath=/usr/lib/aarch64-linux-gnu
    default-sequential-cxx-flags: -I/usr/include -D_ENABLE_EXTENDED_ALIGNED_STORAGE
    default-omp-link-line: -L/usr/lib/aarch64-linux-gnu -lboost_context -lboost_fiber -Wl,-rpath=/usr/lib/aarch64-linux-gnu -fopenmp
    default-omp-cxx-flags: -I/usr/include -fopenmp -D_ENABLE_EXTENDED_ALIGNED_STORAGE
    default-is-explicit-multipass: false
    default-save-temps: false
  • For issues related to the runtime, setting the environment variable ACPP_DEBUG_LEVEL=3 will cause it to print a lot of diagnostic information that might be helpful. Attach the output of your program with ACPP_DEBUG_LEVEL=3 if you think it might be helpful for your issue.
    Execution output (fail.log) and DEBUG output(fail_output.log) are attached.
    fail.log
    fail_debug.log

  • Recent AdaptiveCpp versions include a tool called acpp-info, which will print information about available backends and devices. This may be interesting for issues related to e.g. device visibility.

=================Backend information===================
Loaded backend 0: OpenMP
  Found device: hipSYCL OpenMP host device

=================Device information===================
***************** 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: 0
  Is out-of-order queue: 1
  Is task graph: 0
 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_read_write: 1
  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
  sscp_kernels: 0
 Device properties:
  max_compute_units: 4
  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

Additional context
Add any other context about the problem here.

@ouankou ouankou added the bug Something isn't working label Apr 6, 2024
@illuhad
Copy link
Collaborator

illuhad commented Apr 12, 2024

Yes, it is expected to work on ARM, and was tested on A64fx and ThunderX2, but I don't know if anybody has ever tried it on Altra.

@nilsfriess, I recall you recently reported to have found some bugs in the tests. Were the group tests by chance among the problematic test cases?

@ouankou
Copy link
Author

ouankou commented Apr 13, 2024

Thanks for the info!

I've also tested it on the Apple M1 Arm chip. Except for acpp, all dependencies are installed from official Debian or LLVM repos.
System: Debian 12 in the UTM virtual machine
Software: LLVM 15/16/17, Boost 1.74.
Building config:

cmake -DWITH_SSCP_COMPILER=OFF -DWITH_ACCELERATED_CPU=ON -DWITH_OPENCL_BACKEND=OFF -DCMAKE_INSTALL_PREFIX=$HOME/Projects/AdaptiveCpp/install -DWITH_CUDA_BACKEND=OFF -DWITH_ROCM_BACKEND=OFF -DWITH_LEVEL_ZERO_BACKEND=OFF -DDEFAULT_TARGETS='omp.accelerated' ..

Identical failures to group functions happened.

@nilsfriess
Copy link
Collaborator

@nilsfriess, I recall you recently reported to have found some bugs in the tests. Were the group tests by chance among the problematic test cases?

I only found some UB in the tests, but I don't think the group tests were among the problematic tests. But I'll check again

@nilsfriess
Copy link
Collaborator

I only found some UB in the tests, but I don't think the group tests were among the problematic tests. But I'll check again

Checked again, there is actually a problem in the group tests (an integer overflow, to be specific). Not sure if this can explain the error reported above.

@illuhad
Copy link
Collaborator

illuhad commented Apr 18, 2024

@ouankou Can you check whether it works as expected with omp.library-only target?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants