Adjust cpp torch trt logging level with compiler option#3181
Merged
narendasan merged 5 commits intopytorch:mainfrom Oct 2, 2024
Merged
Adjust cpp torch trt logging level with compiler option#3181narendasan merged 5 commits intopytorch:mainfrom
narendasan merged 5 commits intopytorch:mainfrom
Conversation
narendasan
reviewed
Sep 30, 2024
narendasan
reviewed
Sep 30, 2024
narendasan
reviewed
Oct 1, 2024
py/torch_tensorrt/dynamo/utils.py
Outdated
| else: | ||
| raise AssertionError(f"{level} is not valid log level") | ||
|
|
||
| torch.ops.tensorrt.set_logging_level(int(log_level)) |
Collaborator
There was a problem hiding this comment.
What happens in the case that it is a python only build? You might want to use enabled features to gate access to this code to only when the C++ runtime is available.
Collaborator
Author
There was a problem hiding this comment.
You're right, I see the problem. Updated the change.
AttributeError: '_OpNamespace' 'tensorrt' object has no attribute 'set_logging_level'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Log level of python and native TRT logger is set differently. Same level from compiler option should be helpful to work with development version of torch-TRT module.
And profile option for c++ trt runtime module is enabled by debug level logging. This is helpful to measure/evaluate
performance with development version of torch-TRT module
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: