-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[2/3][AOT][DeviceAPI] Add Hooks for Activate/Deactivate/Open/Close #9500
Conversation
fb75858
to
c88bb17
Compare
This adds the relevant hooks into their starting places in the code generation. As per the [C Device API RFC](https://github.com/apache/tvm-rfcs/blob/main/rfcs/0031-devices-api.md)
c88bb17
to
4dbe678
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 @Mousius .
Few concerns around executor_factory APIs and others are basically nits.
a69a7ac
to
36042e4
Compare
|
||
def representative_dataset(): | ||
for _ in range(100): | ||
data = np.random.rand(*tuple([1, 3, 4, 3])) |
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.
@Mousius Could the unpack here be directly from the list? Like: ...rand(*[1, 3, 4, 3])
?
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.
Oh, nice spot @gromero, by the same token I don't think we even need to unpack the list? This is the same as rand(1, 3, 4,3)
, I'll clear this up 😸
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.
@Mousius Hi! Yeah, I thought of that too (avoiding the unpack too), however I assumed you would like to keep it as [1, 3, 4, 3]
just to be "more explicit" by keeping the dimensions written in a form as you pass later for example to tf.TensorSpec
. Either way looks fine to me, just the form with "tuple" seems superfluous :)
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.
@mbs-octoml can you take a look too?
@manupa-arm can you take another look? |
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
Lets follow up with any outstanding comments in 3/3. @gromero @mbs-octoml |
…pache#9500) * [AOT][DeviceAPI] Add Hooks for Activate/Deactivate/Open/Close This adds the relevant hooks into their starting places in the code generation. As per the [C Device API RFC](https://github.com/apache/tvm-rfcs/blob/main/rfcs/0031-devices-api.md) * Standardise on `lowered_ir_mods` and correct device_hook variable name
…pache#9500) * [AOT][DeviceAPI] Add Hooks for Activate/Deactivate/Open/Close This adds the relevant hooks into their starting places in the code generation. As per the [C Device API RFC](https://github.com/apache/tvm-rfcs/blob/main/rfcs/0031-devices-api.md) * Standardise on `lowered_ir_mods` and correct device_hook variable name
…pache#9500) * [AOT][DeviceAPI] Add Hooks for Activate/Deactivate/Open/Close This adds the relevant hooks into their starting places in the code generation. As per the [C Device API RFC](https://github.com/apache/tvm-rfcs/blob/main/rfcs/0031-devices-api.md) * Standardise on `lowered_ir_mods` and correct device_hook variable name
…pache#9500) * [AOT][DeviceAPI] Add Hooks for Activate/Deactivate/Open/Close This adds the relevant hooks into their starting places in the code generation. As per the [C Device API RFC](https://github.com/apache/tvm-rfcs/blob/main/rfcs/0031-devices-api.md) * Standardise on `lowered_ir_mods` and correct device_hook variable name
…pache#9500) * [AOT][DeviceAPI] Add Hooks for Activate/Deactivate/Open/Close This adds the relevant hooks into their starting places in the code generation. As per the [C Device API RFC](https://github.com/apache/tvm-rfcs/blob/main/rfcs/0031-devices-api.md) * Standardise on `lowered_ir_mods` and correct device_hook variable name
This adds the relevant hooks into their starting places in the code generation. As per the C Device API RFC
This stacks on top of #9395