Repository navigation
feat(mlir): Vectorize transcendental math and RBF-style elementwise kernels across C/MLIR backends - #1318
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…ernels across C/MLIR backends Closes #751. Implemented direct lowering of transcendental math functions (e.g. `exp`, `log`, `sin`, `pow`, etc.) to the MLIR `math` dialect for the `mlir` backend. They are properly typed and mapped when declared as `extern` functions in the source file. C backend utilizes `#pragma clang loop vectorize` hints along with `-fveclib=libmvec` flags which were already partially implemented in `cgen.flow` and `tools/run/main.flow`. Added elementwise benchmarks for RBF-style operations (`rbf_kernel.flow`) and a Gaussian Naive Bayes likelihood (`gaussian_nb.flow`) calculation to ensure accuracy bounds (testing against expected analytical values to avoid semantic bugs) and to track performance baselines in `benchmarks/cross_harness/tests/`. Generated the bootstrap C sources and ensured self-hosting works. Co-authored-by: godofecht <[email protected]>
b5c0792 to
7674ac3
Compare
Co-authored-by: Abhishek Shivakumar <[email protected]>
#1291 replaced the file_transform, json_parse, and strings cross-harness stubs with real programs but left the MLIR corpus goldens at the empty main() digest. Self-host then failed those three entries. Record the current flowc MLIR for the new sources. Co-authored-by: Abhishek Shivakumar <[email protected]>
#1277 added registry/packages/ffi/README.md and src/buffer_handoff.flow and grew src/lib.flow, but left tests/pkg_parity checksums stale. The self-host "Package dependency goldens" step failed install-ffi, sync-ffi, add-ffi, and add-at-ffi (130 pass / 4 fail). Co-authored-by: Abhishek Shivakumar <[email protected]>
#1277 added README.md and buffer_handoff.flow and grew lib.flow, which stales the install/sync/add ffi snapshots used by check_pkg_parity. Same class of CI failure already patched on #1334/#1318. Co-authored-by: Abhishek Shivakumar <[email protected]>
* feat(pygments): add missing tokens and corpus verification - Added `«»∪∩σ@"?$\` to the lexer punctuation/operators. - Updated `test_lexer.py` to recursively test all repository Flow files. - Documented in `ecosystem-recognition.md` that upstreaming is blocked per Pygments external community size requirements. - Added GitHub Actions CI job to verify the pygments tests locally. Co-authored-by: godofecht <[email protected]> * fix: refresh MLIR corpus digests for rewritten cross-harness programs #1291 replaced dummy return-0 stubs in three cross-harness benchmarks with real programs but left compiler/fixtures/mlir/corpus.txt on the old stub digests. The self-host MLIR parity job was skipped on that main push, so the drift only showed up when this PR touched ci.yml. Co-authored-by: Abhishek Shivakumar <[email protected]> * fix: refresh ffi pkg_parity goldens after buffer handoff files #1277 added README.md and buffer_handoff.flow and grew lib.flow, which stales the install/sync/add ffi snapshots used by check_pkg_parity. Same class of CI failure already patched on #1334/#1318. Co-authored-by: Abhishek Shivakumar <[email protected]> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: godofecht <[email protected]> Co-authored-by: Cursor Agent <[email protected]>
Implemented direct lowering of transcendental math functions (e.g.
exp,log,sin,pow, etc.)to the MLIR
mathdialect for themlirbackend. They are properly typed and mapped when declaredas
externfunctions in the source file.C backend utilizes
#pragma clang loop vectorizehints along with-fveclib=libmvecflagswhich were already partially implemented in
cgen.flowandtools/run/main.flow.Added elementwise benchmarks for RBF-style operations (
rbf_kernel.flow) anda Gaussian Naive Bayes likelihood (
gaussian_nb.flow) calculation to ensureaccuracy bounds (testing against expected analytical values to avoid semantic bugs)
and to track performance baselines in
benchmarks/cross_harness/tests/.Generated the bootstrap C sources and ensured self-hosting works.
PR created automatically by Jules for task 13522931439501081923 started by @godofecht