-
Notifications
You must be signed in to change notification settings - Fork 363
fix(//py): Fix trtorch.Device alternate contructor options #635
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
@peri044 Can you review this quickly it needs to get into the patch release with the module fallback fix |
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:
Reformatting /workspace/py/trtorch/Input.py
Reformatting /workspace/py/trtorch/__init__.py
Reformatting /workspace/py/trtorch/_types.py
Reformatting /workspace/py/trtorch/ptq.py
Reformatting /workspace/py/trtorch/logging.py
Reformatting /workspace/py/trtorch/_compile_spec.py
Reformatting /workspace/py/trtorch/Device.py
Reformatting /workspace/py/trtorch/_compiler.py
Reformatting /workspace/py/setup.py
Reformatting /workspace/tests/py/test_ptq_trt_calibrator.py
Reformatting /workspace/tests/py/test_api_dla.py
Reformatting /workspace/tests/py/model_test_case.py
Reformatting /workspace/tests/py/test_to_backend_api.py
Reformatting /workspace/tests/py/test_ptq_to_backend.py
Reformatting /workspace/tests/py/test_ptq_dataloader_calibrator.py
Reformatting /workspace/tests/modules/hub.py
--- /workspace/tests/py/test_api.py (original)
+++ /workspace/tests/py/test_api.py (reformatted)
@@ -218,6 +218,7 @@
color = trtorch.logging.get_is_colored_output_on()
self.assertTrue(color)
+
class TestDevice(unittest.TestCase):
def test_from_string_constructor(self):
@@ -263,7 +264,7 @@
device = trtorch.Device._from_torch_device(torch.device("cuda:0"))
self.assertEqual(device.device_type, trtorch.DeviceType.GPU)
self.assertEqual(device.gpu_id, 0)
-
+
def test_suite():
suite = unittest.TestSuite()
Reformatting /workspace/tests/py/test_multi_gpu.py
Reformatting /workspace/tests/py/test_qat_trt_accuracy.py
Reformatting /workspace/tests/py/test_trt_intercompatability.py
Reformatting /workspace/tests/py/test_api.py
ERROR: Some files do not conform to style guidelines
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.
Code conforms to C++ style guidelines
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:
Reformatting /workspace/py/trtorch/Input.py
Reformatting /workspace/py/trtorch/__init__.py
Reformatting /workspace/py/trtorch/_types.py
Reformatting /workspace/py/trtorch/ptq.py
Reformatting /workspace/py/trtorch/logging.py
Reformatting /workspace/py/trtorch/_compile_spec.py
Reformatting /workspace/py/trtorch/Device.py
Reformatting /workspace/py/trtorch/_compiler.py
Reformatting /workspace/py/setup.py
--- /workspace/tests/py/test_api.py (original)
+++ /workspace/tests/py/test_api.py (reformatted)
@@ -218,6 +218,7 @@
color = trtorch.logging.get_is_colored_output_on()
self.assertTrue(color)
+
class TestDevice(unittest.TestCase):
def test_from_string_constructor(self):
@@ -263,7 +264,7 @@
device = trtorch.Device._from_torch_device(torch.device("cuda:0"))
self.assertEqual(device.device_type, trtorch.DeviceType.GPU)
self.assertEqual(device.gpu_id, 0)
-
+
def test_suite():
suite = unittest.TestSuite()
Reformatting /workspace/tests/py/test_multi_gpu.py
Reformatting /workspace/tests/py/test_api_dla.py
Reformatting /workspace/tests/py/model_test_case.py
Reformatting /workspace/tests/py/test_trt_intercompatability.py
Reformatting /workspace/tests/py/test_api.py
Reformatting /workspace/tests/py/test_ptq_trt_calibrator.py
Reformatting /workspace/tests/py/test_qat_trt_accuracy.py
Reformatting /workspace/tests/py/test_to_backend_api.py
Reformatting /workspace/tests/py/test_ptq_to_backend.py
Reformatting /workspace/tests/py/test_ptq_dataloader_calibrator.py
Reformatting /workspace/tests/modules/hub.py
ERROR: Some files do not conform to style guidelines
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.
Code conforms to C++ style guidelines
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:
Reformatting /workspace/py/trtorch/Input.py
Reformatting /workspace/py/trtorch/__init__.py
Reformatting /workspace/py/trtorch/_types.py
Reformatting /workspace/py/trtorch/ptq.py
Reformatting /workspace/py/trtorch/logging.py
Reformatting /workspace/py/trtorch/_compile_spec.py
Reformatting /workspace/py/trtorch/Device.py
Reformatting /workspace/py/trtorch/_compiler.py
Reformatting /workspace/py/setup.py
Reformatting /workspace/tests/py/test_multi_gpu.py
Reformatting /workspace/tests/py/test_api_dla.py
Reformatting /workspace/tests/py/model_test_case.py
Reformatting /workspace/tests/py/test_to_backend_api.py
Reformatting /workspace/tests/py/test_ptq_to_backend.py
Reformatting /workspace/tests/py/test_ptq_dataloader_calibrator.py
Reformatting /workspace/tests/modules/hub.py
--- /workspace/tests/py/test_api.py (original)
+++ /workspace/tests/py/test_api.py (reformatted)
@@ -218,6 +218,7 @@
color = trtorch.logging.get_is_colored_output_on()
self.assertTrue(color)
+
class TestDevice(unittest.TestCase):
def test_from_string_constructor(self):
@@ -263,7 +264,7 @@
device = trtorch.Device._from_torch_device(torch.device("cuda:0"))
self.assertEqual(device.device_type, trtorch.DeviceType.GPU)
self.assertEqual(device.gpu_id, 0)
-
+
def test_suite():
suite = unittest.TestSuite()
Reformatting /workspace/tests/py/test_ptq_trt_calibrator.py
Reformatting /workspace/tests/py/test_qat_trt_accuracy.py
Reformatting /workspace/tests/py/test_trt_intercompatability.py
Reformatting /workspace/tests/py/test_api.py
ERROR: Some files do not conform to style guidelines
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.
Code conforms to C++ style guidelines
Also I need to rebase this and the module fallback changes on the 0.4.0 tag |
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. Tests pass
(Also we need to update this branch to 1.9.1) |
99b15f8
to
8bf0cb0
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.
Code conforms to C++ style guidelines
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:
Reformatting /workspace/py/trtorch/Input.py
Reformatting /workspace/py/trtorch/__init__.py
Reformatting /workspace/py/trtorch/_types.py
Reformatting /workspace/py/trtorch/ptq.py
Reformatting /workspace/py/trtorch/logging.py
Reformatting /workspace/py/trtorch/_compile_spec.py
Reformatting /workspace/py/trtorch/Device.py
Reformatting /workspace/py/trtorch/_compiler.py
Reformatting /workspace/py/setup.py
Reformatting /workspace/tests/py/test_ptq_trt_calibrator.py
Reformatting /workspace/tests/py/test_api_dla.py
Reformatting /workspace/tests/py/model_test_case.py
Reformatting /workspace/tests/py/test_to_backend_api.py
Reformatting /workspace/tests/py/test_ptq_to_backend.py
Reformatting /workspace/tests/py/test_ptq_dataloader_calibrator.py
Reformatting /workspace/tests/modules/hub.py
--- /workspace/tests/py/test_api.py (original)
+++ /workspace/tests/py/test_api.py (reformatted)
@@ -218,6 +218,7 @@
color = trtorch.logging.get_is_colored_output_on()
self.assertTrue(color)
+
class TestDevice(unittest.TestCase):
def test_from_string_constructor(self):
@@ -263,7 +264,7 @@
device = trtorch.Device._from_torch_device(torch.device("cuda:0"))
self.assertEqual(device.device_type, trtorch.DeviceType.GPU)
self.assertEqual(device.gpu_id, 0)
-
+
def test_suite():
suite = unittest.TestSuite()
Reformatting /workspace/tests/py/test_multi_gpu.py
Reformatting /workspace/tests/py/test_qat_trt_accuracy.py
Reformatting /workspace/tests/py/test_trt_intercompatability.py
Reformatting /workspace/tests/py/test_api.py
ERROR: Some files do not conform to style guidelines
There were issues setting fields of trtorch.Device via kwargs, this patch should resolve those and verify that they work Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
8bf0cb0
to
f51f92e
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:
Reformatting /workspace/py/trtorch/Input.py
Reformatting /workspace/py/trtorch/__init__.py
Reformatting /workspace/py/trtorch/_types.py
Reformatting /workspace/py/trtorch/ptq.py
Reformatting /workspace/py/trtorch/logging.py
Reformatting /workspace/py/trtorch/_compile_spec.py
Reformatting /workspace/py/trtorch/Device.py
Reformatting /workspace/py/trtorch/_compiler.py
Reformatting /workspace/py/setup.py
--- /workspace/tests/py/test_api.py (original)
+++ /workspace/tests/py/test_api.py (reformatted)
@@ -218,6 +218,7 @@
color = trtorch.logging.get_is_colored_output_on()
self.assertTrue(color)
+
class TestDevice(unittest.TestCase):
def test_from_string_constructor(self):
@@ -263,7 +264,7 @@
device = trtorch.Device._from_torch_device(torch.device("cuda:0"))
self.assertEqual(device.device_type, trtorch.DeviceType.GPU)
self.assertEqual(device.gpu_id, 0)
-
+
def test_suite():
suite = unittest.TestSuite()
Reformatting /workspace/tests/py/test_multi_gpu.py
Reformatting /workspace/tests/py/test_qat_trt_accuracy.py
Reformatting /workspace/tests/py/test_trt_intercompatability.py
Reformatting /workspace/tests/py/test_api.py
Reformatting /workspace/tests/py/test_ptq_trt_calibrator.py
Reformatting /workspace/tests/py/test_api_dla.py
Reformatting /workspace/tests/py/model_test_case.py
Reformatting /workspace/tests/py/test_to_backend_api.py
Reformatting /workspace/tests/py/test_ptq_to_backend.py
Reformatting /workspace/tests/py/test_ptq_dataloader_calibrator.py
Reformatting /workspace/tests/modules/hub.py
ERROR: Some files do not conform to style guidelines
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.
Code conforms to C++ style guidelines
f51f92e
to
fa08311
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.
Code conforms to C++ style guidelines
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.
Code conforms to Python style guidelines
Description
There were issues setting fields of trtorch.Device via
kwargs, this patch should resolve those and verify that they
work
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: