Skip to content
This repository was archived by the owner on Mar 29, 2025. It is now read-only.

Allow TensorDims to be used in Repeat#1518

Merged
mergify[bot] merged 1 commit intoplaidml-v1from
tzerrell-tensordim-repeat
Oct 31, 2020
Merged

Allow TensorDims to be used in Repeat#1518
mergify[bot] merged 1 commit intoplaidml-v1from
tzerrell-tensordim-repeat

Conversation

@tzerrell
Copy link
Copy Markdown
Contributor

Accept TensorDims for the repeats parameter of the oplib function repeat. This is intended to help us avoid compute_shape in the OV Bucketize code in plaidml/openvino#90

@denise-k
Copy link
Copy Markdown

LGTM - seems like a reasonable way to avoid compute_shape/explicit broadcasting.

For what it's worth, this wouldn't really have any impact on the TF frontend because XLA implements tf.tile/tf.repeat as a bunch of low-level broadcasts/reshapes.

@flaub
Copy link
Copy Markdown
Contributor

flaub commented Oct 31, 2020

FYI with the recent rewrite of the eDSL implementation based on the AST, compute_shape is no longer as expensive as it once was. However, I think we should continue to follow the advice of using bind_dims or TensorDim over using compute_shape. And while it's not as expensive as it was before, it's still something that can usually be avoided.

@mergify mergify bot merged commit abd6223 into plaidml-v1 Oct 31, 2020
@mergify mergify bot deleted the tzerrell-tensordim-repeat branch October 31, 2020 00:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants