Skip to content

Commit 14d823f

Browse files
committed
remove TODO of tensorscalar
1 parent 3344b45 commit 14d823f

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

ext/TensorOperationsChainRulesCoreExt.jl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,11 @@ function ChainRulesCore.rrule(
3939
return output, tensoralloc_pullback
4040
end
4141

42-
# TODO: possibly use the non-inplace functions, to avoid depending on Base.copy
4342
function ChainRulesCore.rrule(::typeof(tensorscalar), C)
4443
projectC = ProjectTo(C)
4544
function tensorscalar_pullback(Δc)
46-
# ΔC = TensorOperations.tensoralloc(typeof(C), TensorOperations.tensorstructure(C))
4745
_Δc = unthunk(Δc)
48-
# @show _Δc
49-
# _Δc_scalar =
50-
# _Δc isa Number ? Δc :
51-
# _Δc isa AbstractArray ? only(Δc) :
52-
# throw(ArgumentError("unexpected Δc: $(typeof(_Δc))"))
53-
# @show projectC(_Δc_scalar)
5446
return NoTangent(), projectC(_Δc)
55-
# return NoTangent(), fill!(ΔC, unthunk(Δc))
5647
end
5748
return tensorscalar(C), tensorscalar_pullback
5849
end

0 commit comments

Comments
 (0)