Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/scripts/resource_canary_baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"stack": 0
},
"canary_block_trsv_f32": {
"regs": 17,
"regs": 19,
"smem": 288,
"spill_loads": 0,
"spill_stores": 0,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ All notable changes to GLASS will be documented here. The format follows

### Fixed

- Restricted optimized callers now reload cross-thread handoffs in triangular
solves, softmax/logsumexp, LU pivot selection/permutation, pivoted inverse,
pivoted LDLT and symmetric eigendecomposition. This fixes wrong results,
invalid accesses and divergent control flow seen despite existing barriers
(including issue #44). Thread-only solves retain ordinary loads.
- Optimized regression coverage now retains the minimal failing caller context
alongside independent-oracle checks for shared/global memory, runtime sizes,
launch geometry, pivoting and trailing synchronization.

- `glass-dispatch.cuh` is included in the CMake install file list (previously
a CMake-installed GLASS could not compile the bare measured-default face).
- CMake propagates the cuBLASDx CUTLASS include path when
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ cd docs && PATH="$(cd .. && pwd)/.venv/bin:$PATH" make all SPHINXOPTS="-W --keep

`release.sh` requires a clean `main`, a changelog entry, a complete
public-overload manifest (every documented overload compile-covered — an
overload metric, not line coverage), all 21 declared behavioral obligations
overload metric, not line coverage), all 22 declared behavioral obligations
passing, a fresh full GPU receipt, and local receipt verification before it
tags and pushes.

Expand Down
11 changes: 9 additions & 2 deletions docs/agent_debugging_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,15 @@ Nasty properties, so check for it deliberately:
in-place-without-`__restrict__` correct ⇒ a `__restrict__` aliasing miscompile, not your algebra.
Don't "fix" it by dropping `__restrict__` (you lose the optimization) — kill the shared re-read.
- **`glass::warp::reduce` is already safe** (shfl-based); `warp::gemm` is flat (no broadcast). The
block-scoped `cgrps`/`__syncthreads` twins are safe *today* (full-block fence) but carry a note to
prefer `g.shfl(pivot, 0)` if ever called with a warp-tiled group.
block-scoped twins also need explicit handoff reads: issue #44 reproduced
stale values through restricted callers despite full-block barriers. Use
`cooperative_detail::load(bar, ptr)` for a value whose ownership changes
between threads; keep the synchronization that orders its producer and
consumer. The helper uses a volatile load for cooperating scopes and a
normal load for `ThreadBarrier`. It is not an atomic or a substitute for a
barrier. Regression coverage lives in `test/test_restrict.py` and compiles
at `-O3`, including partial blocks, true runtime sizes, global/shared buffers,
multidimensional launches, and immediate consumers after return.

### 1h. Loop-unroll copies contract FMAs differently → thread-count NON-invariance inside ONE kernel

Expand Down
64 changes: 64 additions & 0 deletions docs/audits/2026-10-28-restrict/CHECKPOINT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Implementation complete and full fresh validation passed: 5,126 tests across 8 shards.
Source commit e537364; final receipt verified with current toolchain and 0.5.0.
Validated delivery branch: fix-restricted-handoffs.
See README.txt final section. The pause record below is historical.

RESUMED by explicit user request, 2026-10-28. See README.txt latest implementation entry.
The following pause checkpoint is historical:

Paused at user's request before implementation edits, 2026-10-28.

Authorization: user wants broad GLASS fixes tonight, full validation, then push
all completed work. pytest-gpu-proof next release version accepted as 0.5.0.
Saved improved plan: README.txt in this directory, including execution target.
No GLASS library/test source edits, commits, pushes, or publications yet.
Only docs/audits/ is untracked in GLASS. pytest-gpu-proof still has the earlier
19-file uncommitted Python-3.10/nvcc metadata change, version remains 0.4.1.

IMPORTANT harness defect noticed during implementation preparation:
extended.cu and derived harnesses contain
if constexpr(OP==8||OP==23) glass::block::inv<T,N>(a,s);
then OP==23 also calls inv_pivoted on the already transformed augmented matrix.
This came from an overbroad textual replacement during audit extension.
Fix the dispatch to OP==8 ONLY, rerun restricted/unrestricted inv_pivoted,
and correct conclusions/records before treating it as a standalone defect.
The current pivoted-inverse stall evidence is for that two-call composition.
Other operation results are unaffected by this particular defect, but audit
all generated harness edits carefully before promoting them to regressions.

Experiment in progress at pause (temporary copy only):
/tmp/glass-fence-experiment is a git-archive copy of baseline GLASS.
BlockBarrier::sync has empty asm volatile memory clobbers before/after sync.
The same clobbers surround raw __syncthreads in softmax/inv/ldlt/syev there.
Purpose: test compiler-visible memory handoffs without adding hardware barriers.
This is a diagnostic experiment, NOT an adopted or validated library fix.
Compile command:
nvcc -O3 -std=c++17 -arch=sm_120 -I/tmp/glass-fence-experiment \
/home/plancher/Desktop/GLASS/docs/audits/2026-10-28-restrict/extended.cu \
-o /tmp/glass-fence-experiment/audit
Log: /tmp/glass-fence-experiment/compile.log
Unified exec session 86596 was still compiling at last poll. No GPU run begun.
Its current input still has the OP23 dispatch defect; correct before interpreting.

Next steps on resume:
1. Inspect compile status; repair/audit exploratory harness and isolated repros.
2. Build reliable per-case permanent regression runner: numerical failures must
exit nonzero, fatal cases isolated/time-bounded, expected cases accounted for.
3. Diagnose memory handoffs, independent restrict qualifiers, standalone CUDA
reduction; compare generated code as needed. Test candidate repairs and
measure performance before broad adoption.
4. Integrate tests/cache/shards/obligations, all planned correctness checks,
downstream checks and fresh signed full receipt before pushing source edits.
5. Prepare 0.5.0 release separately; don't conflate Git push with publication.

Tool access: GPU nvidia-smi and CUDA execution require sandbox escalation;
inside sandbox nvidia-smi misleadingly says driver unavailable. Outside sandbox
RTX 5090 sm_120, nvcc 13.2.86, driver 615.71.09. gh network also escalated.
No agents spawned; delegation not explicitly authorized.

Instructions already consulted: GLASS CLAUDE.md, debugging guide (large combined
read truncated; reread needed sections), testing_oracles.rst, namespace guide,
bench/TUNING.md (combined output may have truncated). No AGENTS.md in GLASS.
For edits, honor arbitrary legal thread counts, barrier policy for shared bodies,
thread-only no-op sync, trailing sync ownership, generated manifest last,
no handwritten generated tuning data. Required docs strict build and tests.
Loading
Loading