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

feat: Save target platform as part of TRTEngine Metadata #3106

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

narendasan
Copy link
Collaborator

Description

Saves the target platform as part of the TRTEngine Data.

Fixes #3103
Fixes #3101

Type of change

Please delete options that are not relevant and/or add your own.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@github-actions github-actions bot added component: tests Issues re: Tests component: core Issues re: The core compiler component: api [Python] Issues re: Python API component: runtime component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Aug 20, 2024
@github-actions github-actions bot requested a review from gs-olive August 20, 2024 22:36
@narendasan narendasan force-pushed the platform_checking branch 2 times, most recently from 4b50ad3 to f2e902b Compare August 21, 2024 03:49
#elif defined(__amd64__) || defined(__x86_64__)
return Platform(Platform::PlatformEnum::kLINUX_X86_64);
#else
return Platform(Platform::PlatformEnum::kLINUX_X86_64);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This should be unknown

Copy link
Collaborator

@peri044 peri044 left a comment

Choose a reason for hiding this comment

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

LGTM with pending comments.

@@ -196,7 +209,6 @@ TRTEngine::TRTEngine(
}

TRTEngine::~TRTEngine() {
cudagraph.reset();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this not needed ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The object destructor calls it and its potentially unsafe to do it ourselves


elif platform.system().lower().startswith("win32"):
# Windows...
if platform.machine().startswith("x86_64"):
Copy link
Collaborator Author

@narendasan narendasan Aug 23, 2024

Choose a reason for hiding this comment

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

.lower amd64

@narendasan narendasan force-pushed the platform_checking branch 2 times, most recently from 5ae6942 to 80de386 Compare August 26, 2024 23:14
@narendasan narendasan merged commit 47ae0fa into main Aug 27, 2024
55 of 67 checks passed
@narendasan narendasan deleted the platform_checking branch August 27, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: api [Python] Issues re: Python API component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: runtime component: tests Issues re: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix typo in runtime.h ✨[Feature] An a checker in the runtime: get_extra_state/set_extra_state
3 participants