pytorch / extension-cpp

C++ extensions in PyTorch
1.02k stars 214 forks source link

Use packed_accessor #33

Closed ClementPinard closed 5 years ago

ClementPinard commented 5 years ago

This PR proposes to use packed accessors in order to index multidimensional tensors inside a kernel function.

I am not particularly happy with how verbose the function parameters became, but at least it's comprehensive !

See the corresponding PR in tutorials here