JuliaDiff / JuliaDiff/ChainRules.jl

BLAS.gemm and BLAS.gemv pullbacks are type-unstable

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

Nobody has claimed this yet.

Dominant language
Julia
Stars
475
Forks
98
PR merge metrics
No merged PRs in 30d

Description

As identified by https://github.com/JuliaDiff/ChainRulesTestUtils.jl/pull/78, the pullbacks for BLAS.gemm and BLAS.gemv are type-unstable because a different InplaceableThunk is returned based on the value of the input parameters. For the norm functions, I worked around this by pushing the condition check to within the thunk, which in this case looks like it will produce a lot of duplicate code. Do we expect that this type-instability to cause decreased efficiency?

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

The issue identifies the pullbacks for BLAS.gemm and BLAS.gemv as the affected entry points; inspect their definitions and the value-dependent InplaceableThunk paths. Confirm whether the return type varies and assess the efficiency impact before deciding whether a thunk-local condition is appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.