Code Inspection
Compiling a signature
cuTile.code_tiled — Function
code_tiled([io::IO], f, argtypes; sm_arch, opt_level, num_ctas, occupancy, num_worker_warps)Print the CUDA Tile IR for a Julia function as a textual MLIR representation. Analogous to code_llvm/code_native. Calls the driver directly without caching in CuTileResults, so reflection never pollutes the compilation cache.
cuTile.code_typed — Function
code_typed(f, argtypes; world, kwargs...) -> Vector{Any}Return typed code for a cuTile function. Analogous to Base.code_typed.
cuTile.code_ircode — Function
code_ircode(mi::MethodInstance; world, always_inline=true) -> (IRCode, rettype)Get optimized IRCode for a MethodInstance using cuTile's overlay method table. If always_inline=true (default), forces all functions to be inlined.
cuTile.code_structured — Function
code_structured(f, argtypes; kwargs...) -> Vector{Pair{StructuredIRCode, DataType}}Return the structured IR for a cuTile function.
Intercepting a launch
cuTile.@device_code_tiled — Macro
@device_code_tiled [io=stdout] expressionPrint the Tile IR (MLIR) for all kernels compiled while evaluating the expression.
Example
@device_code_tiled @cuda backend=cuTile blocks=grid vadd(a, b, c)cuTile.@device_code_typed — Macro
@device_code_typed [io=stdout] expressionPrint the typed Julia IR for all kernels compiled while evaluating the expression.
Example
@device_code_typed @cuda backend=cuTile blocks=grid vadd(a, b, c)cuTile.@device_code_structured — Macro
@device_code_structured [io=stdout] expressionPrint the StructuredIRCode for all kernels compiled while evaluating the expression.
Example
@device_code_structured @cuda backend=cuTile blocks=grid vadd(a, b, c)