diff --git a/core/util/Exception.h b/core/util/Exception.h index 8725601467..8f05056fbc 100644 --- a/core/util/Exception.h +++ b/core/util/Exception.h @@ -1,3 +1,7 @@ +// Include cstdint for GCC 13+ or Clang 13+ +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 13)) || (defined(__clang__) && (__clang_major__ >= 13)) +#include +#endif #pragma once #include diff --git a/examples/int8/training/vgg16/requirements.txt b/examples/int8/training/vgg16/requirements.txt index 3b0b03f5d7..47520ba685 100644 --- a/examples/int8/training/vgg16/requirements.txt +++ b/examples/int8/training/vgg16/requirements.txt @@ -2,7 +2,6 @@ tensorboard>=1.14.0 protobuf==3.20.* nvidia-pyindex --extra-index-url https://pypi.nvidia.com -pytorch-quantization tqdm nvidia-modelopt --extra-index-url https://pypi.nvidia.com diff --git a/noxfile.py b/noxfile.py index 478de6c5da..ffe85d7207 100644 --- a/noxfile.py +++ b/noxfile.py @@ -6,7 +6,7 @@ # Use system installed Python packages PYT_PATH = ( - "/usr/local/lib/python3.10/dist-packages" + "/usr/local/lib/python3.12/dist-packages" if not "PYT_PATH" in os.environ else os.environ["PYT_PATH"] ) diff --git a/tests/py/ts/ptq/test_ptq_dataloader_calibrator.py b/tests/py/ts/ptq/test_ptq_dataloader_calibrator.py index 275aaadd9b..9e3068ec3b 100644 --- a/tests/py/ts/ptq/test_ptq_dataloader_calibrator.py +++ b/tests/py/ts/ptq/test_ptq_dataloader_calibrator.py @@ -4,9 +4,9 @@ import torch import torch.nn as nn import torch_tensorrt as torchtrt +import torch_tensorrt.ts.ptq as PTQ import torchvision import torchvision.transforms as transforms -import torch_tensorrt.ts.ptq as PTQ from torch.nn import functional as F from torch_tensorrt.ts.logging import * @@ -15,7 +15,7 @@ def find_repo_root(max_depth=10): dir_path = os.path.dirname(os.path.realpath(__file__)) for i in range(max_depth): files = os.listdir(dir_path) - if "WORKSPACE" in files: + if "MODULE.bazel" in files: return dir_path else: dir_path = os.path.dirname(dir_path) diff --git a/tests/py/ts/ptq/test_ptq_trt_calibrator.py b/tests/py/ts/ptq/test_ptq_trt_calibrator.py index 5ebd47e807..bef057081b 100644 --- a/tests/py/ts/ptq/test_ptq_trt_calibrator.py +++ b/tests/py/ts/ptq/test_ptq_trt_calibrator.py @@ -1,6 +1,7 @@ import os import unittest +import tensorrt as trt import torch import torch.nn as nn import torch_tensorrt as torchtrt @@ -9,14 +10,12 @@ from torch.nn import functional as F from torch_tensorrt.ts.logging import * -import tensorrt as trt - def find_repo_root(max_depth=10): dir_path = os.path.dirname(os.path.realpath(__file__)) for i in range(max_depth): files = os.listdir(dir_path) - if "WORKSPACE" in files: + if "MODULE.bazel" in files: return dir_path else: dir_path = os.path.dirname(dir_path)