Skip to content

Linear algebra type stability enhancements and matrix solve support - #132

Merged
krasow merged 15 commits into
developfrom
solve
Jun 2, 2026
Merged

Linear algebra type stability enhancements and matrix solve support#132
krasow merged 15 commits into
developfrom
solve

Conversation

@Nader-Rahhal

@Nader-Rahhal Nader-Rahhal commented May 20, 2026

Copy link
Copy Markdown
Collaborator

related Legate PR: JuliaLegate/Legate.jl#84
Currently uses 1 gpu

requires legate_branch: develop

@Nader-Rahhal
Nader-Rahhal requested a review from krasow May 20, 2026 18:00
Comment thread src/ndarray/linalg.jl Outdated
@krasow
krasow changed the base branch from main to develop May 31, 2026 19:00
@krasow

krasow commented Jun 1, 2026

Copy link
Copy Markdown
Member

@Nader-Rahhal I got the tests passing in CI; however, we need to expand the tests to encapsulate all supported types for solve and the lin alg test suite. Basically adding a for T in SUPPORTED_NUMERIC_TYPES (or being more restrictive for things that fail in solve) over the test case.

@Nader-Rahhal

Copy link
Copy Markdown
Collaborator Author

@Nader-Rahhal I got the tests passing in CI; however, we need to expand the tests to encapsulate all supported types for solve and the lin alg test suite. Basically adding a for T in SUPPORTED_NUMERIC_TYPES (or being more restrictive for things that fail in solve) over the test case.

Sounds good. I can get this implemented tomorrow.

@Nader-Rahhal

Copy link
Copy Markdown
Collaborator Author

@krasow I added the type coverage. For all types that arent FP and Complex, cupynumeric casts to f64 so we just copy that

@krasow

krasow commented Jun 1, 2026

Copy link
Copy Markdown
Member

@Nader-Rahhal You should use one of the predefined consts (defined in src/cuNumeric.jl) instead of listing out everything. Additionally, you can enable verbose=true on the testset so it prints out by T pass/fail.

@krasow

krasow commented Jun 2, 2026

Copy link
Copy Markdown
Member

I removed the as_type conversions to get solve passing for integer types. We can not support ints on solve. Or we can do an implicit type conversion to floats.

@krasow krasow changed the title matrix solve Linear algebra type stability enhancements and matrix solve support Jun 2, 2026
@krasow
krasow merged commit 97dc5f5 into develop Jun 2, 2026
7 of 8 checks passed
@krasow
krasow deleted the solve branch June 2, 2026 20:44
ejmeitz added a commit that referenced this pull request Aug 12, 2026
* Allow for unary reductions with arbitrary dims (#120)

Co-authored-by: krasow <krasow@u.northwestern.edu>

* adjust CI pipelines

* Fix developer build.

* Fix memory leak (#136)

* fix memory leak with cxxwrap

* fix get_ptr missing modifcations for get_store changes

* Update versioninfo() output. Remove the storage of .githash (#138)

* update versioninfo() output. Remove the storage of .githash

* cpu ci patch. Has the ability to use a specific legate branch by comment within PR. However, if any wrapper code is changed in the Legate branch && there is no released wrapper- tests will fail on purpose. This signifies a new wrapper needs to be released.

* add script to check versions for PRs into main (#139)

* bump version and try guards if they fail resolving

* add registry update?

* add General registry?

* cleanup /dev

* Build refactor (#137)

* Linear algebra type stability enhancements and matrix solve support (#132)

---------
Co-authored-by: krasow <krasow@u.northwestern.edu>

* disable Float16 in supported float types. Left as a TODO.

* skip Int8 unary reduction (with dims) tests on minimum and maximum on GPU. (#141)

* Fix infinite loop on high memory pressure.  (#145)

* update GC memory.jl to only trigger if memory pressure is actually changing between GC iterations.

* Better Benchmark Harness (#140)

---------

Co-authored-by: krasow <krasow@u.northwestern.edu>

* Update Buildkite pipeline for the new JuliaGPU cluster. (#147)

Switch to the per-backend queues of the new JuliaGPU cluster.

Co-authored-by: David Krasowska <krasowska89@gmail.com>

* Broadcast Kernel Fusion (#119)

Broadcast fusion support, layout transformations, memory leak patches, new documentation, pretty printers for lifetime analysis and broadcast fusion kernels.
---------

Co-authored-by: krasow <krasow@u.northwestern.edu>

* Hdf5 impl (#129)

---------

Co-authored-by: krasow <krasow@u.northwestern.edu>

* SVD and QR linalg operators (#143)


---------

Co-authored-by: krasow <krasow@u.northwestern.edu>

* Update nda_get_slice impl to remove std::vector alloc (#151)

* nda_move destruction changes (#153)

* Remove uncessary size checks for launching fused broadcast exprs (#152)

* Remove complex type mappings for Julia (#159)

* Remove complex type mappings for Julia

Removed mapping for C++ complex types to Julia complex types.

* add accessor tests

* retrigger

* retrigger

---------

Co-authored-by: David Krasowska <krasowska89@gmail.com>

* Buildkite CI Filtering (#162)

* patch ci: compare against main since main has published JLL

* patch ci: CPU JLL CI is triggering when the PR has no wrapper changes, but there is a difference between main and the PR

* Cartesian indexing for broadcast fusion (#156)

* Inter-broadcast expr kernel fusion and MacroTools refactor (#154)

* inter-broadcast kernel fusion. Leverage lifetime analysis to rewrite expr blocks to maximize fusion and reducing temps

* Refactor lifetime analysis w/ MacroTools.  (#157)

* encapsulate scoped expr in a let block

* lifetime scoping: scalars don't need to become hoisted temps. And updated pretty printers

* hints for undef

* add documentation about our inter-broadcast fusion anti pattern regarding pre-allocations

* handle dot macro expansion properly

* materialize scalar broadcasts to fix test case:
            @analyze_lifetimes begin
                tmp = @. A + B
                result .= @. tmp * multiplier + T(1.0)
            end

* 26.06 changes (#146)

* VERSION mismatch patches

* Downgrade CNPreferences version

Downgrade CNPreferences from version 0.1.3 to 0.1.2.

* Revert "Downgrade CNPreferences version"

This reverts commit 11b21c5.

* CI patches: fix sources in test Project.toml and update buildkite JLL caching conflicts

* new finalizer for 1.12

* add same caching mech to developer pipeline

* Revert "new finalizer for 1.12"

This reverts commit d23f819.

* Reduction tolerances scaling w/ N (#169)

* Fix 1.12 finalizer threading issues w/ queue read by main thread (#168)

* update to 0.2.1 legate and rm build caches for wrappers

* PTX Compat Selection (#167)

* update cache again.

* Retrigger CI

* rm some compile cache

* timeout to 90

* user-decision lifetime decisions in our scoping analysis (#170)

* Fix return args in user-defined lifetime macro  (#171)

* Use ParallelTestRunner (#173)

---------

Co-authored-by: David Krasowska <krasowska89@gmail.com>

---------

Co-authored-by: Nader <107228500+Nader-Rahhal@users.noreply.github.com>
Co-authored-by: Ethan Meitz <54505069+ejmeitz@users.noreply.github.com>
Co-authored-by: Tim Besard <tim.besard@gmail.com>
krasow added a commit that referenced this pull request Aug 12, 2026
- Added HDF5 dataset reading and writing (#129).
- Added broadcast kernel fusion with layout transformations, Cartesian indexing, and MacroTools-based lifetime analysis with pretty printers (#119, #154, #156, #157).
- Added user-controlled lifetime decisions in scoping analysis (#170, #171).
- Added SVD and QR linear-algebra operators (#143).
- Added matrix solve support and linear-algebra type-stability improvements (#132).
- Added unary reductions over arbitrary dimensions (#120).
- Fixed memory leaks, slice/move allocations, and unnecessary broadcast size checks (#136, #151, #152, #153).
- Fixed infinite loop under high memory pressure and finalizer threading issues on Julia 1.12 (#145, #168).
- Removed complex type mappings for Julia (#159).
- Improved reduction tolerance scaling and skipped unstable Int8 reduction tests (#141, #169).
- Improved developer builds, benchmark harness, versioninfo() output, and PR version validation (#137, #138, #139, #140).
- Improved Buildkite CI for the new JuliaGPU cluster, PR filtering, and ParallelTestRunner (#147, #162, #173).
- Updated compatibility to Legate 26.06 and added PTX compat selection (#146, #167).
- Additional CI adjustments, developer-build fixes, and Float16 handling landed as direct commits without PR numbers.

---------

Co-authored-by: Nader <107228500+Nader-Rahhal@users.noreply.github.com>
Co-authored-by: Ethan Meitz <54505069+ejmeitz@users.noreply.github.com>
Co-authored-by: Tim Besard <tim.besard@gmail.com>
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.

2 participants