[Backend][Relax] Add NPU BYOC backend example
This commit introduces a vendor-neutral NPU backend that demonstrates architectural patterns common across Neural Processing Units.
The implementation covers key NPU concepts including multi-tier memory hierarchy management, automatic tiling for large tensors, quantization handling, and specialized execution engines. It shows how NPUs manage memory across different tiers (L0/L1/L2/L3), tile operations to fit in on-chip SRAM, and dispatch operations to dedicated compute units.
This serves as an educational template for developers creating NPU backends, demonstrating BYOC integration while teaching NPU-specific optimization strategies. Uses CPU emulation for testing without requiring actual NPU hardware.
CC @tqchen - This addresses your feedback from #18201 regarding generic NPU BYOC tutorials.
cc @mshr-h can you help to take a look
@tvm-bot rerun
@Aristide021 ,
Very nice work, congratulations!
As a simple user who might have such interests, walking through the contrib section, could there be a simple README.md companion in this python/tvm/relax/backend/contrib/example_npu with basic description of this folder's content ? It could describe a summary/purpose/technical/diagram (not necessarily all enumerated) perhaps even output results of the examples.
E.g. the description given here in the header of the PR is very useful but users don't "immediately" read the originating PR.
@Aristide021 ,
Very nice work, congratulations!
As a simple user who might have such interests, walking through the
contribsection, could there be a simpleREADME.mdcompanion in thispython/tvm/relax/backend/contrib/example_npuwith basic description of this folder's content ? It could describe a summary/purpose/technical/diagram (not necessarily all enumerated) perhaps even output results of the examples.E.g. the description given here in the header of the PR is very useful but users don't "immediately" read the originating PR.
@cbalint13 Thank you for the feedback! I've added a comprehensive README.md in the latest commit that includes context and documentation that a user would need to understand when implementing an NPU backend.