Function tvm::tirx::transform::SplitHostDevice

Function tvm::tirx::transform::SplitHostDevice#

Function Documentation#

Pass tvm::tirx::transform::SplitHostDevice()#

Annotate, split, and lower host/device functions.

This pass first annotates device regions within host functions, then splits them into host and device-side Functions, and finally lowers host-to-device calls into the device kernel launch ABI.

The resulting host-side function will keep the same tvm::attr::kTarget.name attribute (e.g. T.target("cuda", host=T.target("llvm"))). This ensures that MakePackedAPI knows which device type should be used for the input tensors.

The resulting device-side function will have the host stripped from its target attribute (e.g. T.target("cuda")).

Returns:

The pass.