-
Notifications
You must be signed in to change notification settings - Fork 364
feat: Safety Mode for Runtime #2512
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
Conversation
09b01e0
to
cc32a3c
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.
Add doc. to PR in runtime, which is linked to by the warning message.
"""
Detected run on multi-gpu system. Safety Doc w/threadpool mention
--> Perf implications of unsafe mode
"""
45675d6
to
518e0a6
Compare
- Add safety mode for Torch-TensorRT runtime - Add C++ TorchBind bindings and relevant lambda functions to get and set necessary attributes - Add runtime augmentations to support different modes - Add testing for safe mode settings
- Add support for device checks in the Python Runtime, to mirror those in the C++ runtime - Fix various issues in partitioning and runtime accordingly
518e0a6
to
b434aee
Compare
b434aee
to
60c73d3
Compare
@@ -31,13 +33,13 @@ c10::optional<RTDevice> get_most_compatible_device(const RTDevice& target_device | |||
if (device.device_name == target_device.device_name) { | |||
// First priority is selecting a candidate which agrees with the current device ID | |||
// If such a device is found, we can select it and break out of the loop | |||
if (device.id == current_device.id && best_match.id != current_device.id) { | |||
if (device.id == current_device.id) { |
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.
Why are we changing these?
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.
During review, it was determined that these are not actually necessary conditions. Since the ID of each device is unique on a given machine, it should not be possible that best_match.id == current_device.id
at this point in the code, so the check is not needed here.
51a3edb
to
94a5995
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.
LGTM, just some minor things that shouldnt require additional review
94a5995
to
90dc976
Compare
Description
Type of change
Checklist: