pytorch
6a5d3dc6 - Add view_as_real support (#1512)

Commit
2 years ago
Add view_as_real support (#1512) I added two new types `Float_2` and `Double_2` to `DataType`. In the future, we might need to add more vector types if we decide to support full `view(dtype)`. I also renamed `ViewDtypeOp` into `ViewAsScalar` and changed its definition: now `ViewAsScalar` has one input TV which must have a vector dtype, and this operator will append a new `IterDomain` of type `IterType::VectorComponent` which iter through the vector dimension. For example, if the input TV of `ViewAsScalar` is `TV[iS{i0}]` of type `Float_2`, then the output will be `TV[iS{i0}, vS{2}]` of type float. `EraseType` is also renamed to `BitCast`. I also added lowering for `ViewAsScalar` in `IndexLowering`.
Author
Parents
Loading