Repository navigation
SyclReproSum 1.2.2
SyclReproSum 1.2.2 validates requested work-group and local-memory capacity
before submitting reduction or scan kernels. Unsupported K and WG_SIZE
combinations now fail with descriptive library exceptions instead of opaque
backend out-of-resources errors.
The release also strengthens strict floating-point enforcement inside the
runtime device environment probe. The library remains header-only,
source-compatible with version 1.2.1, 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
- Validate
WG_SIZEagainst the device's maximum supported work-group size. - Validate the local-memory footprint of the per-work-item binned
accumulators before kernel submission. - Report requested and available capacity in descriptive
std::runtime_errorexceptions. - Apply the strict floating-point pragma directly inside the runtime device
environment probe kernel. - Add parameterized correctness coverage for supported and rejected
work-group configurations. - Update the encoded library version to 1.2.2.
Work-group capacity validation
The reduction and cumulative-scan kernels keep one Binned<T, K>
accumulator per work-item in local memory. Although the public template
parameters already require WG_SIZE to be a power of two from 2 through
1024, an otherwise valid compile-time configuration may still exceed the
limits of a particular device.
Version 1.2.2 checks two device-specific limits for every nonempty
adn::sum and adn::cumsum operation:
WG_SIZEmust not exceed
sycl::info::device::max_work_group_size.WG_SIZE * sizeof(Binned<T, K>)must not exceed
sycl::info::device::local_mem_size.
For example, a configuration with additional folds and a large work-group:
double result = adn::sum<9, 512>(q, input, count);may fit on one device but exceed the work-group or local-memory capacity of
another. The library now detects that condition before submitting a
reduction or scan kernel.
If the requested work-group is too large, the exception reports the
requested and maximum work-group sizes. If the binned accumulators require
too much local memory, the exception reports both the required and
available byte counts and suggests reducing WG_SIZE or K.
This replaces backend-dependent failures such as
UR_RESULT_ERROR_OUT_OF_RESOURCES with a descriptive API-level
std::runtime_error.
The reported local-memory size is an upper bound. A backend may reserve part
of that memory internally, so passing this validation cannot guarantee that
every backend will accept a configuration at the exact advertised limit.
Stronger device floating-point probe
The runtime environment probe verifies effective device behavior for
round-to-nearest arithmetic, gradual underflow, and signed-zero
preservation.
Version 1.2.2 applies the strict floating-point pragma directly inside the
probe kernel body. Propagation of a pragma from the enclosing host function
into a SYCL kernel lambda is not guaranteed, so applying it at the device
expression site makes the intended floating-point requirements explicit.
The advertised capability checks and the arithmetic values tested by the
runtime probe are unchanged.
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.
Valid configurations retain the same bit-reproducibility and numerical
behavior as version 1.2.1. Within the documented accumulator capacity:
- Scalar sums remain independent of input permutation, work-group size,
work-item scheduling, and validated device. - Cumulative prefixes remain bit-identical across runs, supported work-group
sizes, and validated devices for a fixed input sequence. - The last cumulative output remains independent of input permutation and
bit-identical to the corresponding scalar sum. - Canonical NaN handling, infinity propagation, signed zero, subnormal
support, and accumulator-capacity limits are unchanged.
The new validation only rejects configurations that exceed the advertised
work-group or local-memory capacity of the selected device.
Testing and validation
One parameterized correctness case was added per selected device:
WorkGroupCapacityValidatedevaluates aK=9,WG_SIZE=512
configuration against the device's advertised limits.- When the configuration fits, the test verifies successful validation and
a correct scalar result. - When it does not fit, the test verifies that validation,
adn::sum, and
adn::cumsumthrowstd::runtime_errorbefore the backend can surface an
opaque resource failure.
The complete suite now contains:
- 174 correctness cases and four throughput benchmarks per selected device.
- Ten cross-device reproducibility cases.
- One version and capacity test.
- 723 total tests on the four-device validation system.
The CUDA, SPIR-V, and AMDGCN fat binaries were 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.
Release validation results:
- All 707 non-benchmark tests passed.
- The same 707 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 723 tests passed with the sixteen 100-million-element scalar and
cumulative throughput benchmarks. - All three AMD-only benchmark invocations passed.
- The CUDA, SPIR-V, and AMDGCN example fat binary built and ran successfully.
- 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.2 is source-compatible with version 1.2.1.
- Existing calls to
adn::sum,adn::cumsum, and
adn::validate_environmentrequire no changes. - Supported
KandWG_SIZEconfigurations retain their existing behavior. - Configurations that exceed a device's advertised work-group or local-memory
limits now fail earlier withstd::runtime_error. - Applications that catch backend-specific out-of-resources failures should
also handle the new library-level exception. - Build targets, backend switches, compiler requirements, and public template
defaults are unchanged. - No compiled library or link step is required. Replace or update
repro_sum.hppand continue compiling as C++17 with SYCL.
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.
- Sufficient work-group and local-memory capacity for the selected
Kand
WG_SIZE. - 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-validationFor a faster correctness-only run:
./repro_test "--gtest_filter=-*Bench*"Changes since 1.2.1
- Validate
WG_SIZEagainst the device maximum work-group size. - Validate the per-work-group binned-accumulator local-memory requirement.
- Produce descriptive exceptions with requested and available capacity
information. - Apply strict floating-point controls directly inside the environment probe
kernel. - Add parameterized work-group capacity coverage for scalar and cumulative
sums. - Update the encoded library version from 1.2.1 to 1.2.2.
Full comparison:
v1.2.1...v1.2.2
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.