Repository navigation
SyclReproSum 1.2.3
SyclReproSum 1.2.3 automatically detects the installed NVIDIA GPU
architecture and passes the corresponding CUDA target to DPC++. CUDA builds
now target the local GPU instead of silently using the compiler's default
architecture.
The release remains header-only, source-compatible with version 1.2.2,
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
- Detect the NVIDIA compute capability with
nvidia-smiwhen a CUDA target
is enabled. - Convert the reported capability to the DPC++ CUDA architecture form, such
as12.0tosm_120. - Pass the detected architecture through
--cuda-gpu-arch=<architecture>to the NVIDIA SYCL target backend. - Allow cross-builds and explicit selection with
CUDA_ARCH, for example
CUDA_ARCH=sm_86. - Fail before compilation with a descriptive message when a CUDA target is
enabled but no architecture can be detected or supplied. - Document automatic detection, cross-compilation, and multi-GPU selection.
- Update the encoded library version to 1.2.3.
NVIDIA architecture detection
Previous releases enabled the nvptx64-nvidia-cuda SYCL target but did not
select a CUDA GPU architecture. The architecture was therefore left to the
compiler default, which may be older than the installed GPU. On the release
validation system, the compiler default was sm_75 while the installed
NVIDIA RTX PRO 4500 Blackwell reports compute capability 12.0.
Version 1.2.3 queries the first capability reported by:
nvidia-smi --query-gpu=compute_cap --format=csv,noheaderThe Makefile removes the decimal point, prefixes the value with sm_, and
passes the resulting architecture to the CUDA backend. On the validation
system, the normal fat-binary build now includes:
-Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_120
The detected architecture is also displayed by make check-config before
compilation:
NVIDIA target: nvptx64-nvidia-cuda (sm_120)
This change affects build-time target selection only. It does not change
runtime device selection, which continues to use ONEAPI_DEVICE_SELECTOR.
Overrides, cross-compilation, and multi-GPU systems
Set CUDA_ARCH explicitly when cross-compiling, when nvidia-smi is not
available, or when targeting a different installed architecture:
make CUDA_ARCH=sm_86
make test CUDA_ARCH=sm_86
make test-validation CUDA_ARCH=sm_86On a multi-GPU system, automatic detection uses the architecture reported for
the first GPU. Use CUDA_ARCH to select another architecture.
When the active SYCL_TARGETS list contains nvptx64-nvidia-cuda and neither
automatic detection nor CUDA_ARCH provides an architecture, the Makefile
stops with a descriptive error and an example override. Builds without the
CUDA target do not require nvidia-smi or CUDA_ARCH.
The architecture flag is part of the recorded build configuration, so
changing CUDA_ARCH causes the affected binaries to be rebuilt.
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.
Version 1.2.3 retains the reproducibility and numerical behavior of version
1.2.2:
- 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, work-group capacity validation, and accumulator-capacity limits
are unchanged.
The CUDA architecture selection changes code generation for the selected
NVIDIA target but does not alter the library's bit-reproducibility contract.
Testing and validation
The complete suite remains:
- 174 correctness cases and four throughput benchmarks per selected device.
- Ten cross-device reproducibility cases.
- One version 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, automatically targeted as
sm_120. - AMD Radeon Pro W7500 (
gfx1102) via HIP. - Intel Graphics [0x7d67] via Level Zero.
- Intel Core Ultra 7 265 CPU via OpenCL.
Release validation results:
- The CUDA, SPIR-V, and AMDGCN example and test fat binaries built
successfully. - The example fat binary ran successfully.
- 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 all four benchmarks.
- Automatic
sm_120detection was verified on the NVIDIA validation GPU. - A
CUDA_ARCH=sm_86override build compiled and ran successfully on the
NVIDIA validation GPU. - The missing-architecture path produced the expected descriptive failure.
- clang-format 18.1.8, project-authored ASCII content, ASCII filenames,
trailing-whitespace, and diff-whitespace checks passed.
The cross-device, shuffled-input, work-group-size, repeated-run,
special-value, cumulative-prefix, and work-group-capacity tests continue to
pass with the explicitly targeted NVIDIA device image.
Compatibility and upgrade notes
- Version 1.2.3 is source-compatible with version 1.2.2.
- Existing calls to
adn::sum,adn::cumsum, and
adn::validate_environmentrequire no changes. - Runtime device selection and the default CUDA, SPIR-V, and AMDGCN fat-binary
target list are unchanged. - Native CUDA builds now require working
nvidia-smiarchitecture detection
or an explicitCUDA_ARCHvalue. - Cross-build and headless environments should set
CUDA_ARCHexplicitly. - Multi-GPU systems should set
CUDA_ARCHwhen the first reported GPU is not
the intended build target. ENABLE_NVIDIA=0or aSYCL_TARGETSlist without the CUDA target continues
to build without NVIDIA architecture detection.- 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. nvidia-smifor automatic CUDA architecture detection, or an explicit
CUDA_ARCHoverride.- 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.2
- Detect NVIDIA compute capability with
nvidia-smi. - Convert the detected capability to a DPC++
sm_XXarchitecture. - Pass
--cuda-gpu-archto the NVIDIA SYCL target backend. - Add the
CUDA_ARCHoverride for cross-builds and explicit target
selection. - Reject CUDA builds with a descriptive error when no architecture is
available. - Document NVIDIA auto-detection and multi-GPU override behavior.
- Update the encoded library version from 1.2.2 to 1.2.3.
Full comparison:
v1.2.2...v1.2.3
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.