Skip to content

Commit

Permalink
Fix typecast error in SelectOpRecord (#3358)
Browse files Browse the repository at this point in the history
The `index` argument does not have to be a `TensorView` for the `select`
operation.

Reference: `NVF_API TensorView* select(TensorView* tv, int64_t dim, Val*
index);`
  • Loading branch information
rdspring1 authored Nov 6, 2024
1 parent 9cc07d7 commit 7074f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csrc/python_frontend/fusion_record.h
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ struct SelectOpRecord : RecordFunctor {

void operator()(FusionState& fd) final {
auto arg1 = fd.getFusionState(args_.at(0).index)->template as<TensorView>();
auto arg3 = fd.getFusionState(args_.at(1).index)->template as<TensorView>();
auto arg3 = fd.getFusionState(args_.at(1).index);

Val* output = select(arg1, dim_, arg3);
fd.setFusionState(outputs_.at(0).index, output);
Expand Down

0 comments on commit 7074f87

Please sign in to comment.