-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Target] Remove deprecated parameters from target #12416
[Target] Remove deprecated parameters from target #12416
Conversation
1becc10
to
4f21a7b
Compare
41de1c8
to
f436301
Compare
Runtime("crt", {"system-lib": True}), | ||
], | ||
], | ||
test_target = tvm.testing.parameter( |
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.
We should probably keep using pytest.mark.parametrize
to aid in linting this file.
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.
done
assert runtime == actual_runtime | ||
|
||
def test_deprecated_target_parameters(test_target, target): | ||
unsupported_config = test_target.split(" ")[1].replace("=", " ").split(" ")[0][1:] |
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.
This is pretty complex, would be better to have test_target
and unsupported_config
in a tuple.
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.
done.
f436301
to
7364b8c
Compare
7364b8c
to
e76f9dc
Compare
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 @mehrdadh, broadly looks good but we should check on system-lib
, because that changes the way code is loaded on the target.
@@ -72,7 +72,7 @@ def build_graph_lib(opt_level): | |||
shape_dict = {input_name: img_data.shape} | |||
|
|||
mod, params = relay.frontend.from_onnx(onnx_model, shape_dict) | |||
target = "llvm -mtriple=wasm32-unknown-unknown -mattr=+simd128 --system-lib" | |||
target = "llvm -mtriple=wasm32-unknown-unknown -mattr=+simd128" |
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.
i think we need to keep --system-lib passed to Executor config here. can you audit the other places you removed --system-lib
and ensure the Executor passed to relay.build has it?
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.
I double checked places that I removed and added to the executor as needed. Please let me know if I missed anything
@Mousius PTAL, thanks! |
1513baa
to
4200527
Compare
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.
LGTM! The failing test seems unrelated, thanks for picking this up @mehrdadh 😸
So What I'm going to do is to fix the behavior of tvm/src/relay/transforms/fuse_ops.cc Lines 1054 to 1056 in 111169c
FuseOps can be called from a context where there is no executor. One of such places is meta schedule task extraction, tvm/src/relay/backend/task_extraction.cc Line 44 in ecfd969
My fix is to look up if |
@masahi I see...I think perhaps we might need to arrange to thread the Executor through. at the moment the way we model memory in the compiler doesn't guarantee that Constant will wind up in any particular location, so link-params is mainly an executor-level thing. what do you think? the change that caused this was also a relay.build API change as well. |
@areusch Since most common use cases do not need
|
* remove depricated parameters in target * lint * fix cpp tests fix * remove more configs in test files * address comments * fix error * fix hexagon * fix micro tutorial * fix integration tests * fix hexagon * lint * fix unittest * fix readme * fix assert executor in target * address comments * fix tutorials * fix hexagon target * fix tutorial * fix for tutorials * hexagon
fixes #12409
cc @areusch @Mousius