The GitHub Actions job "Lint" on tvm.git/script/canonical-parser-df has failed. Run started by GitHub user tqchen (triggered by tqchen).
Head commit for run: 7505c9a88d43b97931cfbb254b0b42cefa09ca44 / Tianqi Chen <[email protected]> [REFACTOR][TVMSCRIPT] Let dialects resolve global metadata Global metadata selectors belong to the language that defines their meaning. Dispatch registered global-info arguments through the active parser protocol, retain Relax selector behavior, and make unsupported TIRx lookup explicit. Introduce a modular, customizable parser infrastructure for TVMScript through transpilation. The key idea is to deterministically transpile language syntax into a corresponding sequence of builder calls while preserving source locations and providing span context. Key design elements include: - Acquire source and its definition scope, collect syntax facts once, rewrite the owned AST, and execute the resulting builder program with the original lexical bindings. - Each language variant customizes behavior through a `parser_protocol.py` file, which defines special handling for syntax such as `for` and `if`. - Create reusable span entries during rewriting. Attach locations to meaningful expressions and pass spans directly to builder operations that own them. - Reuse existing builder and IR APIs, so new types and functions can be added without changing the parser, provided they have well-defined builder behavior. - Generate specialization handling only when specialization is requested. For example, this kernel: ```python @T.prim_func def add_one(A: T.Buffer((128,), "float32"), B: T.Buffer((16, 8), "float32")): for i in range(128): B[i // 8, i % 8] = A[i] + 1 ``` is lowered to the following builder calls. This presentation wraps the emitted program in `build_add_one` and gives its local scaffolding readable aliases. `I` supplies shared builders, `T` is the dialect namespace, `_S` holds source-span entries, and `_host0` and `_host1` are captured annotation helpers. ```python def build_add_one(): with I.IRBuilder() as builder: with T.function_(span=_S[6]) as fn: T.func_name('add_one') _parameter0 = T.arg('A', _host0(_S[1](T.Buffer(_S[0]((128,)), 'float32'))), span=_S[2]) _parameter1 = T.arg('B', _host1(_S[4](T.Buffer(_S[3]((16, 8)), 'float32'))), span=_S[5]) def build_body(): global T A, B = fn.params with T.for_(T.range_(128), span=_S[7], names='i') as i: _value0 = _S[9](_S[8](A[i]) + 1) T.setitem_(B, (_S[10](i // 8), _S[11](i % 8)), _value0, span=_S[12]) build_body() result = fn.function result.__name__ = 'add_one' T.check_well_formed_(result) return fn.function ``` Report URL: https://github.com/apache/tvm/actions/runs/36010431874 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
