Skip to content
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

torchscript, cpu and gpu support #1015

Merged
merged 29 commits into from
Aug 1, 2023
Merged

torchscript, cpu and gpu support #1015

merged 29 commits into from
Aug 1, 2023

Conversation

horheynm
Copy link
Member

@horheynm horheynm commented Apr 27, 2023

Torchscript integration

Example

model = "path_to_dot_pt" or nn_module or torchscipt_model
device = "cpu" or "cuda"
engine = TorchScriptEngine(model, device=device)
inp = [numpy.random.rand(1, 3, 224, 224).astype(numpy.float32)]
out = engine(inp)

@horheynm horheynm changed the title torchscript, gpu support torchscript, cpu and gpu support Jun 21, 2023
@horheynm horheynm marked this pull request as ready for review June 26, 2023 14:28
@horheynm horheynm requested review from a team, markurtz, KSGulin and rgreenberg1 and removed request for a team June 26, 2023 14:28
@horheynm horheynm marked this pull request as draft June 26, 2023 14:30
@horheynm horheynm marked this pull request as ready for review July 6, 2023 01:03
@horheynm horheynm force-pushed the torchscript branch 2 times, most recently from f4bd721 to c39f061 Compare July 6, 2023 01:35
Copy link
Contributor

@bfineran bfineran left a comment

Choose a reason for hiding this comment

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

LGTM pending comments - additionally, let's update PR description to include scope of feature as well as example snippet

future work should add zoo support

setup.py Outdated Show resolved Hide resolved
src/deepsparse/benchmark/torchscript_engine.py Outdated Show resolved Hide resolved
src/deepsparse/benchmark/torchscript_engine.py Outdated Show resolved Hide resolved
src/deepsparse/benchmark/torchscript_engine.py Outdated Show resolved Hide resolved
src/deepsparse/benchmark/torchscript_engine.py Outdated Show resolved Hide resolved
src/deepsparse/benchmark/torchscript_engine.py Outdated Show resolved Hide resolved
src/deepsparse/benchmark/torchscript_engine.py Outdated Show resolved Hide resolved
tests/conftest.py Show resolved Hide resolved
tests/conftest.py Show resolved Hide resolved
tests/test_torchscript.py Show resolved Hide resolved
@bfineran bfineran merged commit 758fc05 into main Aug 1, 2023
@bfineran bfineran deleted the torchscript branch August 1, 2023 13:35
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.

2 participants