cuTENSOR: Fix reference to undefined variable #2263
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a small fix about a typo in figuring out the
compute_type
in theplan_reduction
function, having three arguments, while only two tensors are involved.On a different note, this is never caught in the tests, as
reduce!
actually determines thecompute_type
before it creates the plan, and there it is correctly implemented. (This is also true forcontract!
,permute!
,elementwise_binary_exectute!
andelementwise_trinary_execute!
, but as far as I can tell, these are all correct). I think it could make sense to remove this duplicate code, and just let theplan_**operation**
functions be the only place where thecompute_type
is determined.I can file a PR for that as well, or update this one, but this is a bit larger of a change so I'd rather get some feedback first.