Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
willtebbutt committed Sep 26, 2024
1 parent a3a46b6 commit 8808ded
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rrules/blas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function rrule!!(
y, dy = viewify(y_dy)

Check warning on line 230 in src/rrules/blas.jl

View check run for this annotation

Codecov / codecov/patch

src/rrules/blas.jl#L225-L230

Added lines #L225 - L230 were not covered by tests

# In this rule we optimise carefully for the special case a == 1 && b == 0, which
# corresponds to simply multiplying symm(A) and B together, and writing the result to C.
# corresponds to simply multiplying symm(A) and x together, and writing the result to y.
# This is an extremely common edge case, so it's important to do well for it.
y_copy = copy(y)
tmp_ref = Ref{Vector{T}}()
Expand Down Expand Up @@ -269,13 +269,13 @@ function rrule!!(
dA[n] -= α * dA_tmp[n]
end

Check warning on line 270 in src/rrules/blas.jl

View check run for this annotation

Codecov / codecov/patch

src/rrules/blas.jl#L268-L270

Added lines #L268 - L270 were not covered by tests

# gradient w.r.t. B.
# gradient w.r.t. x.
BLAS.symv!(ul, α, A, dy, one(T), dx)

Check warning on line 273 in src/rrules/blas.jl

View check run for this annotation

Codecov / codecov/patch

src/rrules/blas.jl#L273

Added line #L273 was not covered by tests

# gradient w.r.t. beta.
= dot(dy, y)

Check warning on line 276 in src/rrules/blas.jl

View check run for this annotation

Codecov / codecov/patch

src/rrules/blas.jl#L276

Added line #L276 was not covered by tests

# gradient w.r.t. C.
# gradient w.r.t. y.
BLAS.scal!(β, dy)

Check warning on line 279 in src/rrules/blas.jl

View check run for this annotation

Codecov / codecov/patch

src/rrules/blas.jl#L279

Added line #L279 was not covered by tests

return NoRData(), NoRData(), dα, NoRData(), NoRData(), dβ, NoRData()

Check warning on line 281 in src/rrules/blas.jl

View check run for this annotation

Codecov / codecov/patch

src/rrules/blas.jl#L281

Added line #L281 was not covered by tests
Expand Down

0 comments on commit 8808ded

Please sign in to comment.