Skip to content

SyclReproSum 1.2.1

Choose a tag to compare

@lilohuang lilohuang released this 30 Jul 15:46
· 13 commits to main since this release

SyclReproSum 1.2.1 adds validated AMD HIP support alongside the existing
CUDA and SPIR-V targets. The standard Make targets now build a single
CUDA + SPIR-V + AMDGCN fat binary by default, while backend switches let
users disable toolchains that are not installed.

The library remains header-only, source-compatible with version 1.2.0,
C++17, and based on the Ahrens-Demmel-Nguyen (ADN) binned floating-point
format. The binned primitives remain adaptations of the ReproBLAS reference
implementation.

Highlights

  • Add validated AMD HIP support for the AMD Radeon Pro W7500 (gfx1102).
  • Build CUDA, SPIR-V, and AMDGCN device images from the normal make,
    make all, make run, make test, and make test-validation targets.
  • Add ENABLE_AMD, ENABLE_NVIDIA, and ENABLE_SPIRV switches, all enabled
    by default.
  • Detect the AMD GPU architecture with rocm_agent_enumerator, with
    AMD_GPU_ARCH available as an explicit override.
  • Select only runtime backends represented in the compiled fat binary.
  • Add the AMD libspirv lookup compatibility alias and the verified
    GlobalOffset LTO pipeline required by the current compiler.
  • Document AMD scalar-sum and cumulative-sum throughput.
  • Expand release validation to three GPUs and one CPU across HIP, CUDA,
    Level Zero, and OpenCL.
  • Update the encoded library version to 1.2.1.

AMD HIP support

With all default backends enabled, the offload target list is:

nvptx64-nvidia-cuda,spir64,amdgcn-amd-amdhsa

The AMD architecture is detected automatically when
rocm_agent_enumerator is available. It can also be specified directly:

make test AMD_GPU_ARCH=gfx1102

Users can disable unavailable backends without introducing separate build or
test workflows:

# CUDA + SPIR-V only
make test ENABLE_AMD=0

# SPIR-V only
make test ENABLE_AMD=0 ENABLE_NVIDIA=0

# HIP only
make test ENABLE_NVIDIA=0 ENABLE_SPIRV=0

The selected target list also controls ONEAPI_DEVICE_SELECTOR, so a disabled
backend is not enumerated by the test suite when its device image is absent.
An explicitly supplied ONEAPI_DEVICE_SELECTOR still takes precedence.

The current Intel DPC++ AMD toolchain requires two compatibility measures:

  • The AMD libspirv device library must contain the group non-uniform shuffle
    builtins supplied by
    intel/llvm#22665.
  • The compiler driver looks for AMD libspirv in amdgcn-amd-amdhsa, while the
    build installs it in amdgcn-amd-amdhsa-llvm. The Makefile creates the
    resource-directory alias used as a local workaround for
    intel/llvm#19339.

The Makefile also supplies the verified AMD offload linker pipeline:

--lto-newpm-passes=globaloffset,lto<O3>

These measures affect compiler and device-library integration only. They do
not patch or alter the SyclReproSum accumulator implementation.

Reproducibility and numerical behavior

This release does not change the ADN accumulator arithmetic, bin layout,
deposit, renormalization, merge, or conversion paths. It also does not change
the public adn::sum, adn::cumsum, or adn::validate_environment APIs.

The one-million-element double wide-range cross-device test produces:

0x430FC878C605717F

The same bits, including after independent input shuffles, were verified on:

  • NVIDIA RTX PRO 4500 Blackwell via CUDA.
  • AMD Radeon Pro W7500 (gfx1102) via HIP.
  • Intel Graphics [0x7d67] via Level Zero.
  • Intel Core Ultra 7 265 CPU via OpenCL.

The established guarantees for canonical NaNs, infinities, signed zero,
subnormal values, accumulator capacity, input order, work-group size, and
validated devices are unchanged from version 1.2.0.

Performance

The AMD benchmarks process 100 million elements. Each value is the mean of
three benchmark invocations, and each invocation averages ten timed runs
after one warmup. Throughput is measured in billions of elements per second.

Scalar-sum throughput

Device Type adn::sum Plain sycl::reduction Slowdown
AMD Radeon Pro W7500 via HIP double 9.2 GElements/s 14.8 GElements/s 1.6x
AMD Radeon Pro W7500 via HIP float 15.7 GElements/s 20.0 GElements/s 1.3x

Cumulative-sum throughput

Device Type adn::cumsum oneDPL inclusive_scan Slowdown
AMD Radeon Pro W7500 via HIP double 0.751 GElements/s 4.876 GElements/s 6.5x
AMD Radeon Pro W7500 via HIP float 1.089 GElements/s 9.126 GElements/s 8.4x

The baselines are not reproducible and are provided only as throughput
comparison points.

Testing and validation

The release fat binary was validated on:

  • NVIDIA RTX PRO 4500 Blackwell via CUDA.
  • AMD Radeon Pro W7500 (gfx1102) via HIP.
  • Intel Graphics [0x7d67] via Level Zero.
  • Intel Core Ultra 7 265 CPU via OpenCL.

The complete suite contains:

  • 173 correctness cases and four throughput benchmarks per selected device.
  • Ten cross-device reproducibility cases.
  • One version test.
  • 719 total tests on the four-device validation system.

Release validation results:

  • All 703 non-benchmark tests passed.
  • The same 703 tests passed under hostile host floating-point modes.
  • Both unsafe-device variants passed all four expected rejection tests.
  • The compile-time unsafe evaluation-mode rejection check passed.
  • All 719 tests passed with the sixteen 100-million-element benchmarks.
  • All three AMD-only benchmark invocations passed.
  • clang-format 18, ASCII-content, and whitespace checks passed.

The cross-device, shuffled-input, work-group-size, repeated-run,
special-value, and cumulative-prefix reproducibility tests continue to pass.

Compatibility and upgrade notes

  • Version 1.2.1 is source-compatible with version 1.2.0.
  • Existing calls to adn::sum, adn::cumsum, and
    adn::validate_environment require no changes.
  • No compiled library or link step is required. Replace or update
    repro_sum.hpp and continue compiling as C++17 with SYCL.
  • CUDA, SPIR-V, and AMD support are now enabled by default in the Makefile.
    Disable any backend whose toolkit is unavailable with its corresponding
    ENABLE_* switch.
  • AMD builds require ROCm, an AMD-capable DPC++ compiler, the patched libspirv
    shuffle builtins, and an fp64-capable device that passes environment
    validation.
  • Switching backend options automatically updates the build configuration and
    rebuilds stale binaries; a manual make clean is not required.

Build requirements

  • A C++17 compiler with SYCL support.
  • Intel DPC++/LLVM with the required CUDA, SPIR-V, and/or AMDGCN targets.
  • CUDA toolkit support when ENABLE_NVIDIA=1.
  • ROCm and a supported AMD GPU architecture when ENABLE_AMD=1.
  • An Intel GPU or CPU runtime when ENABLE_SPIRV=1.
  • At least one fp64-capable SYCL CPU or GPU device that passes runtime
    environment validation.
  • Shared USM for every valid nonempty operation.
  • Device USM for cumulative sums and sums of plain host arrays.
  • oneDPL headers for the cumulative-sum throughput baseline.
  • The Google Test submodule for the test suite.

Typical commands remain:

make all
make run
make test
make test-validation

For a faster correctness-only run:

./repro_test "--gtest_filter=-*Bench*"

Changes since 1.2.0

  • Add AMDGCN compilation and AMD HIP runtime selection.
  • Add configurable CUDA, SPIR-V, and AMD backend switches.
  • Add AMD architecture detection and explicit override support.
  • Add AMD libspirv and offload linker compatibility handling.
  • Validate reproducibility and hostile-mode behavior on the AMD Radeon Pro
    W7500.
  • Document AMD scalar and cumulative throughput.
  • Expand the default validation system from three devices to four.
  • Update the encoded library version from 1.2.0 to 1.2.1.

Full comparison:
v1.2.0...v1.2.1

Attribution and license

SyclReproSum is licensed under the BSD 3-Clause License. Portions of the
binned accumulator primitives are adapted from ReproBLAS, Copyright 2016,
University of California. See THIRD_PARTY_NOTICES for the complete
attribution and license terms.