In D157528#4612148, @srishti-pm wrote:! In D157528#4608458, @amandatang wrote:
example1_test, example2_test and check_commutative_small_similar_ancestor_tree are the only tests that worked prior to the fixes in this patch.The 5 (out of 7) new tests that are added in this patch that were already working without the fixes are example1_test, example2_test, check_commutative_non_lowest_level_block_argument, check_commutative_small_similar_ancestor_tree, and check_commutative_equal_ancestor_traversal_different_size. Every new test you add with a proposed fix should be failing before the fix. That is the only way it demonstrates the existence of a fix.
! In D157528#4608458, @amandatang wrote:
When coming up with test cases, I was also considering coverage and other edge cases that would be nice to have checks for in case more changes are made in the future. That's why some of them do already work correctly without changes. I can add these in another separate patch following the 4 for these bug fixes.Yes, this is orthogonal work and should be done in a completely different patch, thanks. Although I don't believe example1_test and example2_test add any new test coverage. I haven't looked at the other 3 tests in detail. Will do that once your patches are broken into multiple patches, as discussed.
Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Aug 25 2023
Aug 24 2023
Aug 23 2023
@srishti-pm @jpienaar Any other followups on this?
Bug 2 and bug 3 are related. When the visitedAncestor check in line 152 is removed, it causes block arguments to not be added to the ancestorQueue. Originally, block arguments are only added because nullptr is not in the visitedAncestor set, so either way, the logic is not sound despite being functional. There could also be additional block argument cast and check to make this more safe.
In D157528#4608941, @srishti-pm wrote:In D157528#4608929, @amandatang wrote:Some of the bug fixes, when moved to their own commit, also caused existing and previously correct test cases to fail.
Why will this happen if your fix is correct? I'd suggest making sure your fix is correct and doesn't have a bug in itself.
Aug 22 2023
@srishti-pm In terms of separating the bug fixes into their own patches and having test cases that illustrate each bug fix, it's very difficult to write tests for each bug fix in isolation when all 4 are present at the same time in the original code. The examples I provided in the summary each assume everything else is correct. Some of the bug fixes, when moved to their own commit, also caused existing and previously correct test cases to fail.
Address comment
In D157528#4608246, @srishti-pm wrote:Thank you for working on this. There are a few issues here. Listing them below:-
- There are 7 new tests added in this patch. 5 of them work correctly without any bug fixes from your patch. Thus, all 5 of them should be removed/modified because they do not reflect the changes done in this patch. You should only add those tests that reflect the functional changes done in this patch. Upon looking closer into them, it seemed that some of them were directly pointing to a specific bug fix (for example @check_commutative_non_lowest_level_block_argument) but those tests were already working correctly before the fix.
- There are 4 bug fixes being offered by this patch. Each of them warrants a separate commit of its own for better readability and ease of review and because they are all orthogonal to each other but fix the same utility. Please create one commit (and thus one patch) for each of the 4 fixes. The first fix can be done here and thus only 3 more commits are needed to be created for the 3 other fixes. Each commit will showcase test(s) that illustrate that specific bug fix. Further, since you are also doing cleanup, feel free to perform cleanup in any subset of these 4 commits.
- Regarding bug 1: No need to explain what an ancestor key entry is and how it is compared. This detail is a black box with respect to this bug and is thus an unnecessary detail to add here. Thus, remove these lines: Each ancestor key entry consists of a type (block_argument, non_constant_op and constant_op in increasing order) and an op name if it is an op (empty for block arguments). An ancestor key entry is smaller if its type is smaller or if it has a smaller op name lexicographically.
- Regarding bug 2: You mention: To fix this, visitedAncestors and its corresponding checks are removed completely. I think some explanation is needed on how the utility works with them removed and whether you have done something else to potentially do what they were doing, but now, correctly. A BFS requires some way to keep track of the visited nodes of the tree.
Aug 21 2023
Address comments
Aug 18 2023
Rename test
Additional tests
Aug 16 2023
Use strict weak ordering in the operand comparison method
Aug 15 2023
Aug 14 2023
@srishti-pm Let me know if these two examples make sense
Add test
Aug 10 2023
Update comments
Aug 9 2023
In D157528#4575049, @srishti-pm wrote:Can you make the summary precise? It's a bit long-winded and the bugs aren't clear from the summary. If you can explain a bug in one line or with a small example, it will be great. You don't need to explain the older functionality in detail.
run clang-format
Jul 20 2023
Jul 19 2023
Clang format
Address comments
Jul 18 2023
rebase
Here's a patch that fixes the issue: https://reviews.llvm.org/D155637
In D155115#4511875, @mehdi_amini wrote:This broke the bot, can you fix or revert?
https://lab.llvm.org/buildbot/#/builders/61/builds/46176
+ /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/FileCheck /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/python/dialects/shape.py error: missing shape attribute Traceback (most recent call last): File "/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/python/dialects/shape.py", line 17, in <module> def testConstShape(): File "/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/python/dialects/shape.py", line 11, in run f() File "/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/python/dialects/shape.py", line 26, in testConstShape def const_shape_tensor(arg): File "/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/tools/mlir/python_packages/mlir_core/mlir/dialects/_func_ops_ext.py", line 190, in decorator return_values = f(*func_args, **func_kwargs) File "/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/python/dialects/shape.py", line 30, in const_shape_tensor x = shape.ConstShapeOp([1, 2]) File "/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/tools/mlir/python_packages/mlir_core/mlir/dialects/_shape_ops_gen.py", line 278, in __init__ results = _ods_ir.InferTypeOpInterface(ConstShapeOp).inferReturnTypes( ValueError: Failed to infer result types
Jul 17 2023
Jul 14 2023
Use function overloading
Use function overloading
Jul 13 2023
clang format
Jul 12 2023
Fix naming
Jul 11 2023
Address final comments
Jul 10 2023
Update documentation
Address comments
Jul 7 2023
Quick fix
clang format
Jul 6 2023
Jun 13 2023
Pull new changes and fix build failure
Jun 5 2023
Use one getGetterName method and logic to handle attributes beginning with has
Jun 1 2023
Reverted changes for AttrName getters and fixed tests
May 31 2023
In D151821#4385036, @rriddle wrote:One thing that's kind of popped up while reading the review is that this going to skew towards attributes with certain naming schemes, which needs to be documented. This is a bit because I feel that 'is' doesn't read well for a number of different cases.