Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Batched Cholesky stats reduction bypassed on Metal without a diagnosis (_serial_cholesky_stats / _host_reduce_cholesky_info)

Open
#138 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
julia
Domain
performance

Research direction

Start in src/numeric/factorize.jl at cholesky_stats!, where the 256-work-item _cholesky_stats_kernel! is bypassed for batched runs by _cholesky_stats_serial_kernel!, and at _numeric_info!, which copies N.info to the host. Run the batched test with SDS_TEST_ONLY=test_ubatch on Metal with both hooks disabled and record the failure. Done means either a fixed barrier race in the shared-memory reduction or a named Metal compiler limit, with one hook kept.

Written by the indexing model from the issue text.

Description

found-by-agent

Found while working on: T31 (PR #136)

What: for uniform batches (nbatch > 1) on Metal, cholesky_stats! (src/numeric/factorize.jl) replaces the 256-work-item _cholesky_stats_kernel! reduction with a one-work-item-per-member serial kernel (_cholesky_stats_serial_kernel!), and _numeric_info! additionally copies all of N.info to the host and recomputes info[ns + 1] per member. The PR does not record why. If the shared @localmem reduction gives a wrong info[ns + 1] on Metal, it may be a latent kernel bug (e.g. a missing barrier hidden by CUDA/AMD warp execution) that affects other backends too; if it is a Metal compiler limit, it should be named. Both hooks may not be needed (the serial kernel already writes info[ns + 1]). The host reduction also copies (ns + 1) * nb Int32 per info read on Metal.

Why it is out of scope: needs Metal hardware to reproduce; no task in TASKS.md owns it.

Suggested fix or plan change: run the batched stats kernel on Metal with SDS_TEST_ONLY=test_ubatch and both hooks off, record the failure; fix the kernel if it is a race, otherwise keep one hook and name the limit.

Dominant language
Julia
Stars
3
Forks
0
Avg merge
4h 1m
Merged PRs (30d)
73

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from exanauts/SparseDirectSolver.jl

All issues in exanauts/SparseDirectSolver.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.