[torch.compile] integration with compilation control (#9058)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import torch.nn as nn
|
||||
|
||||
import vllm.envs as envs
|
||||
from vllm.compilation.levels import CompilationLevel
|
||||
from vllm.platforms import current_platform
|
||||
from vllm.utils import is_cpu, is_hip, is_xpu
|
||||
|
||||
@@ -55,7 +56,7 @@ class CustomOp(nn.Module):
|
||||
# NOTE(woosuk): Here we assume that vLLM was built for only one
|
||||
# specific backend. Currently, we do not support dynamic dispatching.
|
||||
|
||||
if envs.VLLM_TEST_COMPILE_NO_CUSTOM_OPS:
|
||||
if envs.VLLM_TORCH_COMPILE_LEVEL >= CompilationLevel.INDUCTOR:
|
||||
return self.forward_native
|
||||
|
||||
if is_hip():
|
||||
|
||||
Reference in New Issue
Block a user