Skip to content

Opt-in GraphBLAS JIT via jit! - #159

Merged
ViralBShah merged 1 commit into
v11from
vs/jit-optin
Oct 27, 2026
Merged

ViralBShah merged 1 commit into
v11from
vs/jit-optin

Conversation

@ViralBShah

Copy link
Copy Markdown
Member

Stacked on #158. It will be rebased onto v11 once #158 merges.

#158 turns the GraphBLAS JIT off at init, because the jll's default compiler is the build machine's gcc path. This PR adds an opt-in way to turn it back on:

SuiteSparseGraphBLAS.jit!()                      # uses Sys.which("cc"), default cache ~/.SuiteSparse/GrB<ver>
SuiteSparseGraphBLAS.jit!(; compiler = "/usr/bin/gcc", cache = "/tmp/grbjit")
SuiteSparseGraphBLAS.jit!(false)

With the JIT on, GraphBLAS compiles kernels it doesn't ship precompiled and caches them for later sessions. Locally with system gcc, the first A[:, j] took 0.31 s to compile its kernel; the next call took 0.1 ms.

  • The default flags assume gcc with OpenMP, so this works out of the box on Linux. macOS (Apple clang has no OpenMP) and Windows would need different flags; that's left for later.
  • GxB_JIT_ERROR and GxB_OUTPUT_IS_READONLY now raise readable errors instead of "Unknown GraphBLAS Exception".
  • The test (Linux with cc only) uses a temporary cache and checks that a kernel .so is compiled. It is added to test/libutils.jl.
  • jit! is listed in the Utilities docs.

Pkg.test() passes locally on Julia nightly.

🤖 Generated with Claude Code

Base automatically changed from vs/graphblas10 to v11 October 27, 2026 15:27
The JIT stays off by default. jit!(true; compiler, cache) points it at a
local C compiler (default Sys.which("cc")) and an optional cache path.
GxB_JIT_ERROR and GxB_OUTPUT_IS_READONLY now raise readable errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.65%. Comparing base (cde8c7f) to head (b5e6ef1).
⚠️ Report is 1 commits behind head on v11.

Additional details and impacted files
@@            Coverage Diff             @@
##              v11     #159      +/-   ##
==========================================
+ Coverage   65.59%   65.65%   +0.06%     
==========================================
  Files          54       54              
  Lines        4441     4449       +8     
==========================================
+ Hits         2913     2921       +8     
  Misses       1528     1528              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ViralBShah
ViralBShah merged commit 7cf693a into v11 Oct 27, 2026
7 checks passed
@ViralBShah
ViralBShah deleted the vs/jit-optin branch October 27, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant