[minor] remove debug code in python/sglang/srt/compilation/weak_ref_tensor_jit.py (#13235)
Co-authored-by: Stefan He <hebiaobuaa@gmail.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import os
|
||||
|
||||
import torch
|
||||
from torch.utils.cpp_extension import load
|
||||
|
||||
_abs_path = os.path.dirname(os.path.abspath(__file__))
|
||||
@@ -10,7 +9,3 @@ load(
|
||||
sources=[f"{_abs_path}/weak_ref_tensor.cpp"],
|
||||
extra_cflags=["-O3"],
|
||||
)
|
||||
|
||||
x = torch.arange(12, device="cuda").reshape(3, 4)
|
||||
y = torch.ops.jit_weak_ref_tensor.weak_ref_tensor(x)
|
||||
print("alias:", x.data_ptr() == y.data_ptr())
|
||||
|
||||
@@ -32,8 +32,6 @@ if _is_npu:
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
SUPPORT_PIN_MEMORY = not _is_npu
|
||||
if SUPPORT_PIN_MEMORY:
|
||||
logger.warning("Current platform not support pin_memory")
|
||||
|
||||
|
||||
def synchronized(func):
|
||||
|
||||
@@ -66,7 +66,7 @@ except ImportError:
|
||||
class IdGenerator:
|
||||
pass
|
||||
|
||||
logger.info("opentelemetry package is not installed, tracing disabled")
|
||||
logger.debug("opentelemetry package is not installed, tracing disabled")
|
||||
|
||||
|
||||
def is_tracing_enabled() -> bool:
|
||||
|
||||
Reference in New Issue
Block a user