-
Notifications
You must be signed in to change notification settings - Fork 363
Refit bug fix #3097
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
Refit bug fix #3097
Conversation
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 19:14:08.524383+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 19:14:28.914991+00:00
@@ -532,6 +532,6 @@
with enable_torchbind_tracing():
exp_program = torch.export.export(
module, tuple(arg_inputs), kwargs=kwarg_inputs, strict=False
)
- torch.export.save(exp_program, file_path)
\ No newline at end of file
+ torch.export.save(exp_program, file_path)
f8b6ac6
to
1f307e1
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 19:15:47.718371+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 19:16:06.105413+00:00
@@ -532,6 +532,6 @@
with enable_torchbind_tracing():
exp_program = torch.export.export(
module, tuple(arg_inputs), kwargs=kwarg_inputs, strict=False
)
- torch.export.save(exp_program, file_path)
\ No newline at end of file
+ torch.export.save(exp_program, file_path)
7f7599b
to
a4a1767
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 20:57:51.366224+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 20:58:11.913742+00:00
@@ -532,6 +532,6 @@
with enable_torchbind_tracing():
exp_program = torch.export.export(
module, tuple(arg_inputs), kwargs=kwarg_inputs, strict=False
)
- torch.export.save(exp_program, file_path)
\ No newline at end of file
+ torch.export.save(exp_program, file_path)
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 20:58:30.164265+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 20:58:51.729699+00:00
@@ -532,6 +532,6 @@
with enable_torchbind_tracing():
exp_program = torch.export.export(
module, tuple(arg_inputs), kwargs=kwarg_inputs, strict=False
)
- torch.export.save(exp_program, file_path)
\ No newline at end of file
+ torch.export.save(exp_program, file_path)
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 22:48:32.396308+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-17 22:48:53.776331+00:00
@@ -532,6 +532,6 @@
with enable_torchbind_tracing():
exp_program = torch.export.export(
module, tuple(arg_inputs), kwargs=kwarg_inputs, strict=False
)
- torch.export.save(exp_program, file_path)
\ No newline at end of file
+ torch.export.save(exp_program, file_path)
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-18 21:21:30.900238+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-18 21:21:49.713339+00:00
@@ -532,6 +532,6 @@
with enable_torchbind_tracing():
exp_program = torch.export.export(
module, tuple(arg_inputs), kwargs=kwarg_inputs, strict=False
)
- torch.export.save(exp_program, file_path)
\ No newline at end of file
+ torch.export.save(exp_program, file_path)
b288f80
to
d9653cd
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-18 21:25:53.397551+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-18 21:26:12.396126+00:00
@@ -532,6 +532,6 @@
with enable_torchbind_tracing():
exp_program = torch.export.export(
module, tuple(arg_inputs), kwargs=kwarg_inputs, strict=False
)
- torch.export.save(exp_program, file_path)
\ No newline at end of file
+ torch.export.save(exp_program, file_path)
@cehongwang can you check in the linting for |
from torch_tensorrt.fx.observer import Observer | ||
from torch_tensorrt.logging import TRT_LOGGER | ||
from tqdm import tqdm |
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.
We already have an optional dependency on rich coming in another PR. We should enable this optionally
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.
Ok I will delete this for now and we can add that later
py/torch_tensorrt/dynamo/_refit.py
Outdated
"weight": 1.0, | ||
"bias": 0.0, | ||
"running_mean": 0.0, | ||
"running_var": 1.0, |
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 these hardcoded ?
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.
These are the default value when those doesn't exist
py/torch_tensorrt/dynamo/_refit.py
Outdated
# Debug Use | ||
# correct = construct_refit_mapping(new_gm, input_list, settings) | ||
# {k: np.allclose(correct[k][0], mapping[k][0].cpu().numpy(), 1e-2, 1e-2) for k in mapping if k in correct} |
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.
remove this
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-19 17:36:07.179801+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-19 17:36:27.161982+00:00
@@ -532,6 +532,6 @@
with enable_torchbind_tracing():
exp_program = torch.export.export(
module, tuple(arg_inputs), kwargs=kwarg_inputs, strict=False
)
- torch.export.save(exp_program, file_path)
\ No newline at end of file
+ torch.export.save(exp_program, file_path)
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-19 17:40:11.059587+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/_compile.py 2024-08-19 17:40:31.806668+00:00
@@ -532,6 +532,6 @@
with enable_torchbind_tracing():
exp_program = torch.export.export(
module, tuple(arg_inputs), kwargs=kwarg_inputs, strict=False
)
- torch.export.save(exp_program, file_path)
\ No newline at end of file
+ torch.export.save(exp_program, file_path)
2762e6e
to
e12d88d
Compare
12d1d80
to
b1fdae3
Compare
b1fdae3
to
df95f00
Compare
c9f1a55
to
e732e4c
Compare
e732e4c
to
df121b9
Compare
…rect result when varify_output is set to True
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.