Thank you so much for your feedback and clarification.
By checking their code I noticed that the variable gate can be accessed as a vector instead of as a pointer.




 tom:

.packed_accessor32 (preferred over the version with size_t if you know it is sufficient)


With the Deprecation warning, it seem to be more than a matter of preference.




 tom:

the compiler may assume that the tensor does not overlap with (written-to) tensors, which allows more aggressive caching.


In the case of the out tensor in my case, and output_gate from the example, the tensor provided to have data written to. This provided argument, however, it is still given using packed_accessor. It don’t think I understood what you mean. Could you expand a bit more on that?




 tom:

The latter should ideally not be size_t but int32_t if that works or int64_t and is the datatype for the indexing arithmetic (32bit is much faster than 64bit on CUDA).


Also, in my case, the tensors are of type float32. However, I think you are referring to the index type, right? It never occurred to me to think about the indexes type. I think int32_t should be enough for my cases since I don’t plan having a tensor that has size bigger than 2^32.

Thank you for your time.