Code Inspection

Compiling a signature

cuTile.code_tiledFunction
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.

source
cuTile.code_typedFunction
code_typed(f, argtypes; world, kwargs...) -> Vector{Any}

Return typed code for a cuTile function. Analogous to Base.code_typed.

source
cuTile.code_ircodeFunction
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.

source
cuTile.code_structuredFunction
code_structured(f, argtypes; kwargs...) -> Vector{Pair{StructuredIRCode, DataType}}

Return the structured IR for a cuTile function.

source

Intercepting a launch

cuTile.@device_code_tiledMacro
@device_code_tiled [io=stdout] expression

Print 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)
source
cuTile.@device_code_typedMacro
@device_code_typed [io=stdout] expression

Print 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)
source
cuTile.@device_code_structuredMacro
@device_code_structured [io=stdout] expression

Print the StructuredIRCode for all kernels compiled while evaluating the expression.

Example

@device_code_structured @cuda backend=cuTile blocks=grid vadd(a, b, c)
source