Repository navigation
refactor(tests): run each test input once through the CLI loader - #269
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
candidatesandfinalizealso checked and analyzed again inside the library.What
checked_program) foranalyze,schedule candidatesandschedule finalize: parse--dim, load, require bound dims, check.candidates()takes a checked program;finalize()takes the memoryAnalysisResultplus the authored function.PassManagerrecords function identities before each pass, so a pass that lowers its input in place is still re-verified.tests/core/_corpus.py). Schedule (121 cases), analysis (84, static table), parser (19 core / 23 nvidia). A case with its own checks is a@casesubclass whose fields hold its expectations and whoseguard()holds its checks.load_authored_ir/load_namespace) inside the test body.import_dsland the test-only loaders are gone; collection executes no fixture file.OpCase.sys.monitoring; CI runs source tests with-n 8.Contract
schedule finalizealways writes a Module, also when it holds a single PrimFunction (docs/spec/cli.md).--dimis refused before the source runs, for all three commands. A specialization error fromschedule candidates/schedule finalizeis now prefixed with the command name, asanalyzealready did.finalize(analyzed, *, authored),candidates(module, entry, *, source)andConvertHIRToTIR(analyzed=, authored=)replace theentry=/dims=forms;ConvertHIRToTIRno longer checks or analyzes (docs/spec/passes.md§7.1).Risk
src/grows by 11 lines: the shared front end and the finalize guard outweigh the three removed copies.examples/*/tir/keep the old single-PrimFunction output; they are generated and no test reads them.docs/tutorial/schedule.ipynbwas already out of date withschedule.md.core/dsl/test_dsl_namespace.py::sub,nvidia/dsl/test_module_decorator.py::_RefusingRoot).nvidia/fixtures/integration/dynamic_cta_square.pyis refused on load; its test is skipped until dynamic CTA lowering exists.