github ↗
docs menu

Module Tolk

#module Bigint : sig ... end

Arbitrary-precision integers.

#module C : sig ... end

Shared libraries of the system.

#module Coalesce : sig ... end

Late index simplification and memory coalescing.

#module Codegen : sig ... end

Code generation: from a kernel to a program.

#module Comgr_worker : sig ... end
#module Compiler_amd : sig ... end

The compiler of HIP for AMD GPUs.

#module Compiler_cpu : sig ... end

The compiler of C for processors.

#module Compiler_cuda : sig ... end

The compiler of CUDA C++ for NVIDIA GPUs.

#module Compiler_metal : sig ... end

Metal: the compiler of Metal Shading Language for Apple GPUs.

#module Compiler_worker : sig ... end

Compiles in processes of their own.

#module Cstyle : sig ... end

Renderers of the C family: kernels as C, Metal, CUDA and HIP source.

#module Decomp_dtype : sig ... end

Emulated data types.

#module Decomp_op : sig ... end

Operations as the operations a target has.

#module Device : sig ... end

Devices as a compiler sees them: the renderer that writes a device's programs, and the compiled program a runtime loads.

#module Dtype : sig ... end

Data types, their constants and their promotion.

#module Gater : sig ... end

Moving gates from indices to memory accesses.

#module Gpudims : sig ... end

Launch dimensions.

#module Graph : sig ... end

UOp graphs as text: the format of the programs the disk cache keeps (Codegen.to_program) and of the goldens, which tolk's test/README.md specifies.

#module Helpers : sig ... end

Compilation targets, integer and list utilities, terminal text, the disk cache and programs.

#module Heuristic : sig ... end

Hand-coded kernel optimisations.

#module Heuristic_common : sig ... end

What Heuristic's rules read of a kernel and apply to it.

#module Heuristic_host : sig ... end

The host's rules of the hand-coded optimisations.

#module Host_config : sig ... end
#module Indexing : sig ... end

Ranges: from whole tensors to indexed elements.

#module Jit : sig ... end

Captured schedules.

#module Linearizer : sig ... end

Ordering a kernel into a list of instructions.

#module Memory : sig ... end

Memory planning.

#module Mtlcompiler_worker : sig ... end
#module Nvrtc_worker : sig ... end
#module Op : sig ... end

Operations.

#module Ops : sig ... end

The intermediate representation: nodes, patterns and graph rewriting.

#module Opt : sig ... end

Kernel optimisations.

#module Postrange : sig ... end

Applying kernel optimisations.

#module Prepare : sig ... end

Preparing a tensor graph for ranges.

#module Rangeify : sig ... end

From tensor graphs to kernel graphs.

#module Realize : sig ... end

The calls of a schedule, and the compilation of their kernels.

#module Render : sig ... end

Nodes as text: expressions and program listings.

#module Renderer : sig ... end

Renderers: what code generation may emit for a target, and how it becomes a program.

#module Schedule : sig ... end

Schedules: from tensor graphs to the calls that realize them.

Searching kernel optimisations by measuring them.

#module Setting : sig ... end

Settings.

#module Shape : sig ... end

Shapes, simplification and the nodes built on shapes.

#module Simplify : sig ... end

Range and reduction simplification.

#module Source_digest : sig ... end
#module Spec : sig ... end

Specifications: the nodes each stage of compilation may hold.

#module Stage : sig ... end

Staging a tensor core's operands through shared memory, and a decoded operand through a panel on the host (Decoded panels on the host).

#module Support_memory : sig ... end

Memory planning.

#module Symbolic : sig ... end

Symbolic simplification for code generation.

#module Tc : sig ... end

Tensor cores.

#module Transcendental : sig ... end

Transcendental functions as arithmetic.

#module Uniform : sig ... end

Values the same for every thread of a workgroup.

#module Uop_weak : sig ... end

Committing weak data types to widths.

#module Worker : sig ... end

Parallel work.