Skip to content

Conversation

@trevor-m
Copy link
Contributor

@trevor-m trevor-m commented May 3, 2021

This PR has some bug fixes and new features for TRT BYOC.

  • Support scalars in explicit batch mode (explicit batch mode is when use_implicit_batch=False).
  • Support reduce to scalar for all reduce ops
  • Mark reduce operators as computationally intensive during subgraph pruning. Default TVM reduce performs poorly on Jetson devices, so we want to offload to TRT in those cases.
  • Remove deleted functions from module after subgraph pruning.
  • Support split operator (with unit tests)

@trevor-m
Copy link
Contributor Author

trevor-m commented May 3, 2021

@comaniac Could you please take a look?

Trevor Morris added 2 commits May 3, 2021 21:45
Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@comaniac comaniac merged commit 0e3d850 into apache:main May 4, 2021
@comaniac
Copy link
Contributor

comaniac commented May 4, 2021

Thanks @trevor-m

umangyadav pushed a commit to umangyadav/tvm that referenced this pull request May 5, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
}
};

class SplitOpConverter : public TensorRTOpConverter {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add #if TRT_VERSION_GE(5, 1, 5) before it because the code uses params->network->addSlice.

map->emplace("expand_dims", std::make_shared<ExpandDimsOpConverter>());
map->emplace("squeeze", std::make_shared<SqueezeOpConverter>());
map->emplace("concatenate", std::make_shared<ConcatOpConverter>());
map->emplace("split", std::make_shared<SplitOpConverter>());
Copy link
Contributor

@apivovarov apivovarov Apr 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should go inside #if TRT_VERSION_GE(5, 1, 5) block below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants