-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[BugFix][UMA] Bugfix of target attr and fixed link in tutorial #12731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -278,7 +278,7 @@ def register(self) -> None: | |||
""" | |||
registration_func = tvm.get_global_func("relay.backend.contrib.uma.RegisterTarget") | |||
|
|||
for name, attr in self._target_attrs: | |||
for name, attr in self._target_attrs.items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix @MichaelJKlaiber, just curious why this didn't get caught by https://github.com/apache/tvm/blob/main/tests/python/contrib/test_uma/test_target.py#L68?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe because this was too generic (though I expect that to be some sort of TypeError) :
with pytest.raises(ValueError): |
Should we make sure that we catch the correct exception ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to @manupak's suggestion; can we either use TVMError or a subclass of that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
I agree with @lhutton1 here. It is puzzling as to why we were not seeing it there. Maybe specializing the ValueError to make sure we catch the right one with the description "Target attribute None is not supported." might be the solution. WDYT ?
@@ -278,7 +278,7 @@ def register(self) -> None: | |||
""" | |||
registration_func = tvm.get_global_func("relay.backend.contrib.uma.RegisterTarget") | |||
|
|||
for name, attr in self._target_attrs: | |||
for name, attr in self._target_attrs.items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe because this was too generic (though I expect that to be some sort of TypeError) :
with pytest.raises(ValueError): |
Should we make sure that we catch the correct exception ?
thanks @MichaelJKlaiber ! agreed with the others that it would be great if we could update the test to cover this case as well |
This PR address fixes for UMA target registration. * Fix the doc issue #13304 * Continues stalled PR #12731 Changes: * Incorporates all proposed fixes from mentioned [PR #12731](#12731) * Address test case concerns and discussions from [PR #12731](#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above.
Closing as this PR is superseded by #13624 |
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above. (cherry picked from commit 0eabbac)
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above.
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above.
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above. Signed-off-by: tqchen <[email protected]>
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above. Signed-off-by: tqchen <[email protected]>
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above. Co-authored-by: Balint Cristian <[email protected]>
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above. Signed-off-by: tqchen <[email protected]> Co-authored-by: Balint Cristian <[email protected]>
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above. Signed-off-by: tqchen <[email protected]> Co-authored-by: Balint Cristian <[email protected]>
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above. Signed-off-by: tqchen <[email protected]> Co-authored-by: Balint Cristian <[email protected]>
[BugFix][UMA] Protect target registration (#13624) (#4) This PR address fixes for UMA target registration. * Fix the doc issue #13304 * Continues stalled PR #12731 Changes: * Incorporates all proposed fixes from mentioned [PR #12731](#12731) * Address test case concerns and discussions from [PR #12731](#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above. Signed-off-by: tqchen <[email protected]> Co-authored-by: Balint Cristian <[email protected]>
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above.
This PR address fixes for UMA target registration. * Fix the doc issue apache#13304 * Continues stalled PR apache#12731 Changes: * Incorporates all proposed fixes from mentioned [PR apache#12731](apache#12731) * Address test case concerns and discussions from [PR apache#12731](apache#12731) * **NEW:** Already exiting target cannot be created, explicit error on this. * **NEW:** Attributes having special/reserved scope cannot be created explicitly. It also address proper test cases for all the above.
There was a flaw in UMA backend.py that triggered an error when for passing target attributes. It is fixed.
A link in the UMA tutorial was broken and fixed by this PR.