-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Labels
Request-bugSomething isn't workingSomething isn't working
Description
Your current environment information
env
Collecting environment information...
PyTorch version: 2.4.1+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OneFlow version: none
Nexfort version: 0.1.dev329+torch241cu121
OneDiff version: 1.2.0
OneDiffX version: none
OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.31
Python version: 3.10.11 (main, Apr 20 2023, 19:02:41) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-117-generic-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 11.8.89
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA L20
GPU 1: NVIDIA L20
GPU 2: NVIDIA L20
GPU 3: NVIDIA L20
GPU 4: NVIDIA L20
GPU 5: NVIDIA L20
GPU 6: NVIDIA L20
GPU 7: NVIDIA L20
Nvidia driver version: 560.35.05
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 52 bits physical, 57 bits virtual
CPU(s): 128
On-line CPU(s) list: 0-127
Thread(s) per core: 2
Core(s) per socket: 32
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 143
Model name: Intel(R) Xeon(R) Gold 6462C
Stepping: 8
CPU MHz: 3900.000
CPU max MHz: 3900.0000
CPU min MHz: 800.0000
BogoMIPS: 6600.00
Virtualization: VT-x
L1d cache: 3 MiB
L1i cache: 2 MiB
L2 cache: 128 MiB
L3 cache: 120 MiB
NUMA node0 CPU(s): 0-31,64-95
NUMA node1 CPU(s): 32-63,96-127
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Versions of relevant libraries:
[pip3] diffusers==0.30.3
[pip3] efficientnet-pytorch==0.7.1
[pip3] mypy-extensions==1.0.0
[pip3] nexfort==0.1.dev329+torch241cu121
[pip3] numpy==1.24.3
[pip3] onnx==1.14.1
[pip3] onnxruntime==1.15.1
[pip3] open-clip-torch==2.20.0
[pip3] pytorch-lightning==1.9.4
[pip3] pytorch-metric-learning==2.3.0
[pip3] torch==2.4.1
[pip3] torchaudio==2.1.2
[pip3] torchdiffeq==0.2.3
[pip3] torchelastic==0.2.2
[pip3] torchmetrics==1.0.3
[pip3] torchsde==0.2.5
[pip3] torchtext==0.6.0
[pip3] torchvision==0.19.1
[pip3] transformers==4.51.2
[pip3] triton==3.0.0
[conda] blas 1.0 mkl
[conda] efficientnet-pytorch 0.7.1 pypi_0 pypi
[conda] ffmpeg 4.3 hf484d3e_0 pytorch
[conda] libjpeg-turbo 2.0.0 h9bf148f_0 pytorch
[conda] mkl 2023.1.0 h6d00ec8_46342
[conda] mkl-service 2.4.0 py310h5eee18b_1
[conda] mkl_fft 1.3.6 py310h1128e8f_1
[conda] mkl_random 1.2.2 py310h1128e8f_1
[conda] nexfort 0.1.dev329+torch241cu121 pypi_0 pypi
[conda] numpy 1.24.3 py310h5f9d8c6_1
[conda] numpy-base 1.24.3 py310hb5e798b_1
[conda] open-clip-torch 2.20.0 pypi_0 pypi
[conda] pytorch-cuda 11.8 h7e8668a_5 pytorch
[conda] pytorch-lightning 1.9.4 pypi_0 pypi
[conda] pytorch-metric-learning 2.3.0 pypi_0 pypi
[conda] pytorch-mutex 1.0 cuda pytorch
[conda] torch 2.4.1 pypi_0 pypi
[conda] torchaudio 2.1.2 py310_cu118 pytorch
[conda] torchdiffeq 0.2.3 pypi_0 pypi
[conda] torchelastic 0.2.2 pypi_0 pypi
[conda] torchmetrics 1.0.3 pypi_0 pypi
[conda] torchsde 0.2.5 pypi_0 pypi
[conda] torchtext 0.6.0 py_1 pytorch
[conda] torchvision 0.19.1 pypi_0 pypi
[conda] triton 3.0.0 pypi_0 pypi
🐛 Describe the bug
code for flux
def onediff_compile(model):
try:
import os
from onediff.infer_compiler import compile as od_compile
HAS_OF = True
os.environ["NEXFORT_FUSE_TIMESTEP_EMBEDDING"] = "0"
os.environ["NEXFORT_FX_FORCE_TRITON_SDPA"] = "1"
except:
HAS_OF = False
if not HAS_OF:
raise RuntimeError(
"pip install onediff nexfort"
)
options = {"mode": "O3"}
optimized_forward = od_compile(
getattr(model, "forward"),
backend="nexfort",
options=options,
)
setattr(model, "forward", optimized_forward)
error
Traceback (most recent call last):
File "/workspace/client.py", line 212, in flux_inference
result = pipeline(prompt=prompt,
File "/workspace/src/flux/xflux_pipeline.py", line 262, in __call__
return self.forward(prompt, width, height, guidance, num_steps, controlnet_image, id_image, id_weight,
File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/workspace/src/flux/xflux_pipeline.py", line 463, in forward
x = denoise(self.model, **inp_cond, timesteps=timesteps, guidance=guidance, id_weight=id_weight,
File "/workspace/src/flux/sampling.py", line 346, in denoise
pred = model(
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/onediff/infer_compiler/backends/nexfort/deployable_module.py", line 38, in deploy_function
return compiled_model(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 433, in _fn
return fn(*args, **kwargs)
File "/workspace/src/flux/model.py", line 176, in forward
return self.weave_speed_forward(img, img_ids, txt, txt_ids, timesteps, y, block_controlnet_hidden_states,
File "/workspace/src/flux/model.py", line 461, in weave_speed_forward
vec = self.time_in(timestep_embedding(timesteps, 256).to(img.dtype))
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1116, in __call__
return self._torchdynamo_orig_callable(
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 948, in __call__
result = self._inner_convert(
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 472, in __call__
return _compile(
File "/opt/conda/lib/python3.10/site-packages/torch/_utils_internal.py", line 84, in wrapper_function
return StrobelightCompileTimeProfiler.profile_compile_time(
File "/opt/conda/lib/python3.10/site-packages/torch/_strobelight/compile_time_profiler.py", line 129, in profile_compile_time
return func(*args, **kwargs)
File "/opt/conda/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 817, in _compile
guarded_code = compile_inner(code, one_graph, hooks, transform)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 231, in time_wrapper
r = func(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 636, in compile_inner
out_code = transform_code_object(code, transform)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py", line 1185, in transform_code_object
transformations(instructions, code_options)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 178, in _fn
return fn(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 582, in transform
tracer.run()
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2451, in run
super().run()
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 893, in run
while self.step():
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 805, in step
self.dispatch_table[inst.opcode](self, inst)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2642, in RETURN_VALUE
self._return(inst)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2627, in _return
self.output.compile_subgraph(
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1098, in compile_subgraph
self.compile_and_call_fx_graph(tx, list(reversed(stack_values)), root)
File "/opt/conda/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1318, in compile_and_call_fx_graph
compiled_fn = self.call_user_compiler(gm)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 231, in time_wrapper
r = func(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1409, in call_user_compiler
raise BackendCompilerFailed(self.compiler_fn, e).with_traceback(
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1390, in call_user_compiler
compiled_fn = compiler_fn(gm, self.example_inputs())
File "/opt/conda/lib/python3.10/site-packages/torch/_dynamo/repro/after_dynamo.py", line 129, in __call__
compiled_gm = compiler_fn(gm, example_inputs)
File "/opt/conda/lib/python3.10/site-packages/torch/__init__.py", line 1990, in __call__
return self.compiler_fn(model_, inputs_, **self.kwargs)
File "src/nexfort/dynamo/backends/nexfort.py", line 34, in nexfort.dynamo.backends.nexfort.nexfort
File "src/nexfort/fx_compiler/fx_compiler.py", line 40, in nexfort.fx_compiler.fx_compiler.compile_fx
File "src/nexfort/fx_compiler/fx_compiler.py", line 50, in nexfort.fx_compiler.fx_compiler.compile_fx
File "/opt/conda/lib/python3.10/site-packages/nexfort/utils/cost.py", line 22, in clocked
return func(*args, **kwargs)
File "src/nexfort/fx_compiler/fx_compiler.py", line 140, in nexfort.fx_compiler.fx_compiler.compile_fx_inner
File "src/nexfort/fx_compiler/fx_compiler.py", line 140, in nexfort.fx_compiler.fx_compiler.compile_fx_inner
File "src/nexfort/fx_compiler/fx_compiler.py", line 167, in nexfort.fx_compiler.fx_compiler.compile_fx_inner
File "src/nexfort/fx_compiler/overrides.py", line 73, in nexfort.fx_compiler.overrides.with_override_torch_env.decorator.wrapper
File "src/nexfort/fx_compiler/overrides.py", line 74, in nexfort.fx_compiler.overrides.with_override_torch_env.decorator.wrapper
File "/opt/conda/lib/python3.10/site-packages/nexfort/utils/cost.py", line 22, in clocked
return func(*args, **kwargs)
File "src/nexfort/fx_compiler/fx_compiler.py", line 186, in nexfort.fx_compiler.fx_compiler.fx_compile
File "/opt/conda/lib/python3.10/site-packages/nexfort/utils/cost.py", line 22, in clocked
return func(*args, **kwargs)
File "src/nexfort/fx_compiler/fx_compiler.py", line 216, in nexfort.fx_compiler.fx_compiler.gm_compile
File "/opt/conda/lib/python3.10/site-packages/nexfort/utils/cost.py", line 22, in clocked
return func(*args, **kwargs)
File "src/nexfort/fx_compiler/fx_compiler.py", line 267, in nexfort.fx_compiler.fx_compiler.with_inductor
torch._dynamo.exc.BackendCompilerFailed: backend='nexfort' raised:
ModuleNotFoundError: No module named 'nexfort.inductor.codegen'
Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information
You can suppress this exception and fall back to eager by setting:
import torch._dynamo
torch._dynamo.config.suppress_errors = True
I have tried whl on this site https://github.com/siliconflow/nexfort_releases/releases/expanded_assets/torch2.4.1_cu121
like 330 or 329 version also get same error
and can't find inductor too
ls $(python -c "import nexfort; import os; print(os.path.join(os.path.dirname(nexfort.__file__), 'inductor'))")
__init__.cpython-310-x86_64-linux-gnu.so kernels utils.cpython-310-x86_64-linux-gnu.so
Metadata
Metadata
Assignees
Labels
Request-bugSomething isn't workingSomething isn't working