What is the relationship between NDBuffer and LayoutTensor? Most of the MAX AI kernels seem to use NDBuffer, but the kernel puzzles seem to prefer LayoutTensor. From my understanding of LayoutTensor, it’s a type designed to facilitate multi-dimensional indexing (but it carries a pointer to some underlying buffer).
How do the MAX AI kernels handle indexing? Is the idea that these will be updated to use LayoutTensor? Or perhaps many of them can’t operate on the underlying NDBuffer without worrying about indexing.
As Sora said, NDBuffer is a legacy type and I’m in the process of migrating our kernels to LayoutTensor. Some of that work is bound on needing to make improvements to the latter though.
We are indeed still working to migrate all uses of NDBuffer to LayoutTensor. It is a gradual process, though, so there are some remnants still in the code. We are continuing to make progress, though.