🐛 Describe the bug The exported model failed to do inference on cuda. import torch ep = torch.export.load('retina.pt2') gm = ep.module() gm(torch.rand(1, 3, 800, 1216)) # success gm = ep.module().cuda() gm(torch.rand(1, 3, 800, 1216).cud...
Tensors and Dynamic neural networks in Python with strong GPU acceleration - `torch._export.aot_compile` CUDA version not compatible with C++ ABI · pytorch/pytorch@a1ba8e6
你可以尝试将NCCL_P2P_LEVEL设置为0,然后重新运行程序。如果问题仍然存在,建议检查你的CUDA和PyTorch...
inputc = torch.randn(input_batch, input_channel, \ input_h, input_w, device='cuda') outputc = net(inputc.cuda()) output_names = ["output1","output2"] input_names = ["inputc"] dynamic_axes = {'inputc': { 2: "inputc_h", 3: 'inputc_w'},'output1': { 2: "output1_h...
raise AttributeError(name) from None AttributeError: Float8_e5m2 Hi, Could you share the below info with us first? >>> import torch >>> torch.cuda.is_available() >>> torch.__version__ >>> import torchvision >>> torchvision.__version__ Thanks....
这个部分是模型的转换部分,将模型转换为torchscript、 onnx、coreml等格式,用于后面的应用中,方便将模型加载到各种设备上。 0、导入需要的包和基本配置 importargparse# 解析命令行参数模块importsys# sys系统模块 包含了与Python解释器和它的环境有关的函数importtime# 时间模块 更底层frompathlibimportPath# Path将str...
Run onnx export got error: RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same weights trained on GPU, and converted both model and image to cuda device, why this error still happens
x = torch.flatten(x, start_dim=1) x = self.classifier(x) x = self.softmax(x) return x # load model model = SVHN() model = model.eval() model = model.cuda() model = model.half() # create sample input input = torch.Tensor(1, 3, 32, 32) ...
rand(1, 3, 800, 1066), torch.rand(1, 800, 1066)) exported_model = export(model.model.backbone, backbone_inputs) ■ Cannot access membe Versions Collecting environment information... PyTorch version: 2.2.1+cpu Is debug build: False CUDA used to build PyTorch: None ROCM used to build ...
Tensors and Dynamic neural networks in Python with strong GPU acceleration - [AOTI] Set CUDA device for torch._export.aot_load (#136715) · pytorch/pytorch@da5c7b6