accessors are not for Autograd but to allow efficient raw memory access, so that doesn’t sound like a good match for what you ask.
Without knowing more (how many elements, what do you want to do with them) it’s hard to tell, but plainly indexing Tensors works well until you hit performance issues. These can occur because indexing will cause the subtensors to be instantiated and connected to the autograd graph, which is a source of overhead.
Best regards
Thomas
Best regards
Thomas