From 0c151db0c2e53eee65f4c3392dbd9cef800a1323 Mon Sep 17 00:00:00 2001 From: Fengtu Wang <1148791151@qq.com> Date: Sun, 21 Sep 2025 18:56:37 +0800 Subject: [PATCH] fix bug fix bug in `pytorch 2.8.0` `ModuleNotFoundError: No module named 'torch._C._nativert'; 'torch._C' is not a package` --- userbenchmark/dynamo/dynamobench/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userbenchmark/dynamo/dynamobench/common.py b/userbenchmark/dynamo/dynamobench/common.py index eede963a1..06a536fab 100644 --- a/userbenchmark/dynamo/dynamobench/common.py +++ b/userbenchmark/dynamo/dynamobench/common.py @@ -42,7 +42,6 @@ import torch.distributed import torch.multiprocessing as mp from torch._C import _has_cuda as HAS_CUDA, _has_xpu as HAS_XPU -from torch._C._nativert import PyModelRunner from torch._dynamo.profiler import fx_insert_profiling, Profiler from torch._dynamo.testing import ( dummy_fx_compile, @@ -1487,6 +1486,7 @@ def load(cls, model, example_inputs): f, exported_programs={"forward": ep} ) filename = f.name + from torch._C._nativert import PyModelRunner cls.cache[key] = PyModelRunner(filename, "forward") return cls.cache[key]