gentileops

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package main generates the Tile IR operation encoding table from NVIDIA's TableGen sources.

The bytecode encoding of an operation is not ad hoc: cuda-tile's BytecodeGen.cpp derives a writer for every operation from its ODS definition, emitting result types, a flags field, attributes, operands and regions in that order (tools/cuda-tile-tblgen/BytecodeGen.cpp:660-666, after the caller has written the opcode). What varies per operation is only shape: how many results, whether they are variadic, which arguments are attributes rather than operands, which of those are optional and so carry a flags bit instead of or alongside a payload, and where counts appear.

The flags field is the part a reading of the emission order misses. It is a single varint bitmask covering every optional attribute and, under AttrSizedOperandSegments, every optional operand; a UnitAttr has no payload at all and exists only as its bit. An encoder that writes attributes and operands without it produces a stream that is wrong from the first operation that has one.

This program recovers that shape from the TableGen sources and writes it as a Go table, so the encoder is derived from NVIDIA's definitions rather than transcribed from a reading of them.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL