Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a1d57b7
docs: design native counter-based RNG
rileyjmurray Aug 1, 2026
506b794
docs: revise native CBRNG design
rileyjmurray Aug 1, 2026
25f0cf7
docs: isolate future RNG work
rileyjmurray Aug 1, 2026
8fdb96b
test: characterize Random123-backed sampling
rileyjmurray Aug 2, 2026
ed7f13f
feat: add native RNG word arrays
rileyjmurray Aug 2, 2026
f58a47b
feat: add bit-compatible native Philox
rileyjmurray Aug 2, 2026
1e7614c
feat: add block output repacking
rileyjmurray Aug 2, 2026
25e6852
feat: add native random transforms
rileyjmurray Aug 2, 2026
e2eba75
refactor: migrate sampling to native RNG states
rileyjmurray Aug 2, 2026
a4d8e0e
build: remove Random123 package dependency
rileyjmurray Aug 2, 2026
d3ae3c0
ci: stop provisioning Random123
rileyjmurray Aug 2, 2026
949f887
docs: document native counter-based RNGs
rileyjmurray Aug 2, 2026
93962bb
perf: avoid redundant Philox round products
rileyjmurray Aug 2, 2026
811ac55
build: remove Random123 from TSAN tooling
rileyjmurray Aug 2, 2026
7b81ecb
style: remove trailing blank lines
rileyjmurray Aug 2, 2026
771463c
docs: record local native CBRNG validation
rileyjmurray Aug 2, 2026
57ff447
fix: qualify floating-point absolute values
rileyjmurray Aug 2, 2026
38a63b4
docs: record native CBRNG validation
rileyjmurray Aug 2, 2026
9ac66b9
docs: plan native CBRNG review remediation
rileyjmurray Aug 7, 2026
38266a7
refactor: simplify native RNG state interfaces
rileyjmurray Aug 7, 2026
8dae3f1
refactor: simplify native RNG distributions
rileyjmurray Aug 7, 2026
5d683c9
test: isolate the sequential RNG stream
rileyjmurray Aug 7, 2026
545fd6c
docs: address native RNG review feedback
rileyjmurray Aug 7, 2026
5e847c7
docs: remove temporary native RNG plans
rileyjmurray Aug 7, 2026
18456a1
Merge branch 'main' into native-cbrng
rileyjmurray Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/actions/setup-randblas-deps-windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ outputs:
blaspp-dir:
description: "Directory containing blasppConfig.cmake."
value: ${{ steps.setup.outputs.blaspp-dir }}
random123-dir:
description: "Directory containing the installed Random123 headers."
value: ${{ steps.setup.outputs.random123-dir }}
googletest-prefix:
description: "GoogleTest installation prefix."
value: ${{ steps.setup.outputs.googletest-prefix }}
Expand Down Expand Up @@ -59,12 +56,6 @@ runs:
path: ${{ github.workspace }}\..\windows-deps\blaspp-install
key: windows-msvc-blaspp-windows-portability-ilp64-sequential-3-${{ hashFiles('.github/actions/setup-randblas-deps-windows/setup.ps1') }}

- name: cache Random123 installation
uses: actions/cache@v4
with:
path: ${{ github.workspace }}\..\windows-deps\Random123-install
key: windows-random123-2-${{ hashFiles('.github/actions/setup-randblas-deps-windows/setup.ps1') }}

- name: cache LAPACK++ installation
if: inputs.install-lapackpp == 'true'
uses: actions/cache@v4
Expand Down
14 changes: 0 additions & 14 deletions .github/actions/setup-randblas-deps-windows/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,6 @@ if (-not (Test-Path -LiteralPath (Join-Path $gtestInstall "lib\cmake\GTest\GTest
)
}

$random123Source = Join-Path $DependencyRoot "Random123"
$random123Install = Join-Path $DependencyRoot "Random123-install"
$random123Include = Join-Path $random123Install "include"
if (-not (Test-Path -LiteralPath (Join-Path $random123Include "Random123\philox.h"))) {
Clone-Head -Url "https://github.com/DEShawResearch/Random123.git" `
-Destination $random123Source
New-Item -ItemType Directory -Force -Path $random123Include | Out-Null
Copy-Item -LiteralPath (Join-Path $random123Source "include\Random123") `
-Destination $random123Include -Recurse
}

$blasppSource = Join-Path $DependencyRoot "blaspp"
$blasppBuild = Join-Path $DependencyRoot "blaspp-build"
$blasppInstall = Join-Path $DependencyRoot "blaspp-install"
Expand Down Expand Up @@ -254,7 +243,6 @@ if ($InstallLapackpp) {

$exports = [ordered]@{
"blaspp_DIR" = Convert-ToCMakePath $blasppDir
"Random123_DIR" = Convert-ToCMakePath $random123Include
"googletest_PREFIX" = Convert-ToCMakePath $gtestInstall
"MKLROOT" = Convert-ToCMakePath $mklRoot
}
Expand All @@ -275,8 +263,6 @@ if ($env:GITHUB_PATH) {
if ($env:GITHUB_OUTPUT) {
"blaspp-dir=$(Convert-ToCMakePath $blasppDir)" |
Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
"random123-dir=$(Convert-ToCMakePath $random123Include)" |
Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
"googletest-prefix=$(Convert-ToCMakePath $gtestInstall)" |
Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
"mkl-root=$(Convert-ToCMakePath $mklRoot)" |
Expand Down
20 changes: 3 additions & 17 deletions .github/actions/setup-randblas-deps/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: setup-randblas-deps
description: >
Installs RandBLAS build dependencies (GoogleTest, BLAS++, Random123, and
optionally LAPACK++), with caching for the from-source dependencies. Exports
blaspp_DIR, Random123_DIR, and (optionally) lapackpp_DIR via GITHUB_ENV.
Installs RandBLAS build dependencies (GoogleTest, BLAS++, and optionally
LAPACK++), with caching for the from-source dependencies. Exports blaspp_DIR
and (optionally) lapackpp_DIR via GITHUB_ENV.

inputs:
cc:
Expand Down Expand Up @@ -188,26 +188,12 @@ runs:
fi
make -j"${jobs}" install

- name: install Random123 headers
shell: bash
run: |
set -euxo pipefail
cd ..
rm -rf Random123 Random123-install
git clone --depth 1 https://github.com/DEShawResearch/Random123.git
# Random123's `make install-include` target uses GNU `cp -d`, which
# isn't supported by BSD cp on macOS. Copy the headers directly so
# the same step works on both platforms.
mkdir -p Random123-install/include
cp -R Random123/include/Random123 Random123-install/include/

- name: export dependency paths
shell: bash
run: |
set -euxo pipefail
cd ..
echo "blaspp_DIR=$(pwd)/blaspp-install/lib/cmake/blaspp" >> "$GITHUB_ENV"
echo "Random123_DIR=$(pwd)/Random123-install/include" >> "$GITHUB_ENV"
if [[ "${{ inputs.install-lapackpp }}" == "true" ]]; then
echo "lapackpp_DIR=$(pwd)/lapackpp-install/lib/cmake/lapackpp" >> "$GITHUB_ENV"
fi
11 changes: 3 additions & 8 deletions .github/scripts/windows/run-ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ if ($SetupDependencies) {
}

$blasppDir = Require-EnvironmentVariable "blaspp_DIR"
$random123Dir = Require-EnvironmentVariable "Random123_DIR"
$mklRoot = Require-EnvironmentVariable "MKLROOT"
$mklBin = Join-Path $mklRoot "bin"
if (-not (Test-Path -LiteralPath $mklBin)) {
Expand All @@ -98,10 +97,8 @@ function Install-RandBLAS {
$build = Join-Path $WorkRoot "$Name-build"
$install = Join-Path $WorkRoot "$Name-install"
$configuredBlasppDir = $blasppDir
$configuredRandom123Dir = $random123Dir
if ($UseNativeDependencyPaths) {
$configuredBlasppDir = $blasppDir.Replace("/", "\")
$configuredRandom123Dir = $random123Dir.Replace("/", "\")
}
$arguments = @(
"-S", $SourceRoot,
Expand All @@ -110,7 +107,6 @@ function Install-RandBLAS {
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=$(Convert-ToCMakePath $install)",
"-Dblaspp_DIR=$configuredBlasppDir",
"-DRandom123_DIR=$configuredRandom123Dir",
"-DBUILD_TESTS=$(if ($BuildTests) { 'ON' } else { 'OFF' })"
)
if ($BuildTests) {
Expand Down Expand Up @@ -165,9 +161,9 @@ switch ($Task) {
-UseNativeDependencyPaths $true
$build = Join-Path $WorkRoot "downstream-consumer-build"

# Deliberately omit blaspp_DIR and Random123_DIR. This makes the smoke
# test exercise the native-backslash dependency paths recorded by
# RandBLASConfig.cmake and guards their generated-path normalization.
# Deliberately omit blaspp_DIR. This makes the smoke test exercise the
# native-backslash dependency path recorded by RandBLASConfig.cmake
# and guards its generated-path normalization.
Invoke-Checked -Program "cmake" -Arguments @(
"-S", (Join-Path $SourceRoot "test\downstream"),
"-B", $build,
Expand Down Expand Up @@ -198,7 +194,6 @@ switch ($Task) {
"-DCMAKE_BUILD_TYPE=Release",
"-DRandBLAS_DIR=$(Convert-ToCMakePath $randblasDir)",
"-Dblaspp_DIR=$blasppDir",
"-DRandom123_DIR=$random123Dir",
"-Dlapackpp_DIR=$lapackppDir"
)
Invoke-Checked -Program "cmake" -Arguments @("--build", $build)
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ jobs:
-DCMAKE_EXE_LINKER_FLAGS="${extra_link_flags}" \
${sanitize_address_arg} \
-Dblaspp_DIR="${blaspp_DIR}" \
-DRandom123_DIR="${Random123_DIR}" \
-DCMAKE_INSTALL_PREFIX="$(pwd)/../RandBLAS-install" \
"$(pwd)/../RandBLAS"

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/downstream-consumer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
cmake \
-DCMAKE_BUILD_TYPE=Release \
-Dblaspp_DIR="${blaspp_DIR}" \
-DRandom123_DIR="${Random123_DIR}" \
-DCMAKE_INSTALL_PREFIX="$(pwd)/../RandBLAS-install" \
"$(pwd)/../RandBLAS"
make -j"$(nproc)" install
Expand All @@ -49,7 +48,6 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$(pwd)/../../../../RandBLAS-install" \
-Dblaspp_DIR="${blaspp_DIR}" \
-DRandom123_DIR="${Random123_DIR}" \
..
make -j"$(nproc)"
./smoke
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
cmake \
-DCMAKE_BUILD_TYPE=Release \
-Dblaspp_DIR="${blaspp_DIR}" \
-DRandom123_DIR="${Random123_DIR}" \
-DCMAKE_INSTALL_PREFIX="$(pwd)/../RandBLAS-install" \
"$(pwd)/../RandBLAS"
make -j"$(nproc)" install
Expand All @@ -51,7 +50,6 @@ jobs:
-DCMAKE_PREFIX_PATH="$(pwd)/../../../RandBLAS-install" \
-Dblaspp_DIR="${blaspp_DIR}" \
-Dlapackpp_DIR="${lapackpp_DIR}" \
-DRandom123_DIR="${Random123_DIR}" \
..
make -j"$(nproc)"

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/thread-sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
-DCMAKE_CXX_FLAGS="-fsanitize=thread -fno-omit-frame-pointer" \
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=thread" \
-Dblaspp_DIR="${blaspp_DIR}" \
-DRandom123_DIR="${Random123_DIR}" \
"$(pwd)/../RandBLAS"
make -j"$(nproc)"

Expand Down
2 changes: 0 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ ctest -V # Verbose output

Key CMake variables:
- `blaspp_DIR`: Path to BLAS++ installation (containing `blasppConfig.cmake`)
- `Random123_DIR`: Path to Random123 headers
- `CMAKE_BUILD_TYPE`: Release or Debug

### Installation
Expand All @@ -186,7 +185,6 @@ Key CMake variables:
mkdir RandBLAS-build && cd RandBLAS-build
cmake -DCMAKE_BUILD_TYPE=Release \
-Dblaspp_DIR=/path/to/blaspp-install/lib/cmake/blaspp/ \
-DRandom123_DIR=/path/to/random123-install/include/ \
../RandBLAS/
make -j install
ctest
Expand Down
34 changes: 0 additions & 34 deletions CMake/FindRandom123.cmake

This file was deleted.

6 changes: 0 additions & 6 deletions CMake/RandBLASConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ if (NOT blaspp_DIR)
endif ()
find_dependency(blaspp)

# Random123
if (NOT Random123_DIR)
set(Random123_DIR "@RandBLAS_CONFIG_RANDOM123_DIR@")
endif ()
find_dependency(Random123)

# OpenMP
set(RandBLAS_HAS_OpenMP @RandBLAS_HAS_OpenMP@)
if (RandBLAS_HAS_OpenMP)
Expand Down
6 changes: 0 additions & 6 deletions CMake/rb_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@
# syntax. In particular, native Windows backslashes would otherwise be parsed
# as escape sequences when a downstream project loads RandBLASConfig.cmake.
file(TO_CMAKE_PATH "${blaspp_DIR}" RandBLAS_CONFIG_BLASPP_DIR)
file(TO_CMAKE_PATH "${Random123_DIR}" RandBLAS_CONFIG_RANDOM123_DIR)

configure_file(CMake/RandBLASConfig.cmake.in
${CMAKE_INSTALL_LIBDIR}/cmake/RandBLAS/RandBLASConfig.cmake @ONLY)

configure_file(CMake/RandBLASConfigVersion.cmake.in
${CMAKE_INSTALL_LIBDIR}/cmake/RandBLAS/RandBLASConfigVersion.cmake @ONLY)

if (PROJECT_NAME STREQUAL "RandBLAS")
install(FILES CMake/FindRandom123.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/RandBLAS")
endif()

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/RandBLAS/RandBLASConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/RandBLAS/RandBLASConfigVersion.cmake
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ include(RuntimeDLLs)

# find dependencies
find_package(blaspp REQUIRED)
find_package(Random123 REQUIRED)
include(OpenMP)
include(MKL_sparse)

Expand Down
Loading
Loading