tvm_tirx.backend.cuda.codegen#
Shared machinery behind every CUDA device-intrinsic codegen.
Both dialects build on this layer: tvm_tirx.backend.cuda.ptx renders PTX
instructions from a table, and tvm_tirx.backend.cuda.cpp registers
hand-written CUDA C++ device helpers.
registry— the op-name → codegen map C++ queries during codegen.schema—device_intrinsic(), the declarative helper registration.header— CUDA header generator and its helper-tag table.types— PTX dtype enum mirroringsrc/backend/cuda/codegen/ptx.cc.utils— small parsing / validation helpers.
Importing registry and header is load-bearing: their module-level
register_global_func decorators publish tirx.intrinsics.cuda.get_codegen
and tirx.intrinsics.cuda.header_generator, which codegen_cuda.cc looks
up when it emits a kernel. Nothing else imports them for their side effects, so
dropping them here fails at kernel-build time, not at import time.
Classes#
|
A Python equivalent of the provided C++ DataType enum class. |
Functions#
Callable wrapper around a TVM FFI function. |
|
Callable wrapper around a TVM FFI function. |
|
|
Register a codegen function for a given op. |
|
Register a CUDA device-helper intrinsic. |