Repository navigation
[DSLX] Re-enable tuple-array loop tests and prefix_scan IR lowering. - #5202
Draft
copybara-service[bot] wants to merge 1 commit into
Draft
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
Now that tuple destructuring in `for`-loop array iterators is supported during IR conversion (#5125, #1289), tests and examples that worked around or disabled IR lowering for `std::enumerate` loops can use direct tuple destructuring and full IR conversion. - Re-enable `IrConverterTest.LoopThroughTupleArray` in `xls/dslx/ir_convert/ir_converter_match_test.cc` and add its golden IR file (`ir_converter_test_LoopThroughTupleArray.ir`). - Destructure `(i, elem)` / `(i, e)` directly in the `for`-loop header of `prefix_scan_eq` in `xls/examples/dslx_intro/prefix_scan_equality.x`, `docs_src/tutorials/prefix_scan.md`, and `docs_src/dslx_reference.md`, removing the `TODO(https://github.com/google/xls/issues/5125)` workarounds. - Enable IR conversion, optimization, and JIT comparison for `prefix_scan_equality` in `xls/examples/dslx_intro/BUILD` by adding `prefix_scan_equality` (`xls_dslx_opt_ir`) and `prefix_scan_equality_test` (`xls_dslx_opt_ir_test`) and setting `dslx_test_args = {"compare": "jit"}` on `prefix_scan_equality_dslx_test`. PiperOrigin-RevId: 1007990718
This branch has not been deployed
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.
[DSLX] Re-enable tuple-array loop tests and prefix_scan IR lowering.
Now that tuple destructuring in
for-loop array iterators is supported during IR conversion (#5125, #1289), tests and examples that worked around or disabled IR lowering forstd::enumerateloops can use direct tuple destructuring and full IR conversion.IrConverterTest.LoopThroughTupleArrayinxls/dslx/ir_convert/ir_converter_match_test.ccand add its golden IR file (ir_converter_test_LoopThroughTupleArray.ir).(i, elem)/(i, e)directly in thefor-loop header ofprefix_scan_eqinxls/examples/dslx_intro/prefix_scan_equality.x,docs_src/tutorials/prefix_scan.md, anddocs_src/dslx_reference.md, removing theTODO(https://github.com/google/xls/issues/5125)workarounds.prefix_scan_equalityinxls/examples/dslx_intro/BUILDby addingprefix_scan_equality(xls_dslx_opt_ir) andprefix_scan_equality_test(xls_dslx_opt_ir_test) and settingdslx_test_args = {"compare": "jit"}onprefix_scan_equality_dslx_test.