[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:
co-authored by
Stefan He
parent
0997c78d2c
commit
22f641ab4f
@@ -1,6 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import torch
|
|
||||||
from torch.utils.cpp_extension import load
|
from torch.utils.cpp_extension import load
|
||||||
|
|
||||||
_abs_path = os.path.dirname(os.path.abspath(__file__))
|
_abs_path = os.path.dirname(os.path.abspath(__file__))
|
||||||
@@ -10,7 +9,3 @@ load(
|
|||||||
sources=[f"{_abs_path}/weak_ref_tensor.cpp"],
|
sources=[f"{_abs_path}/weak_ref_tensor.cpp"],
|
||||||
extra_cflags=["-O3"],
|
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__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
SUPPORT_PIN_MEMORY = not _is_npu
|
SUPPORT_PIN_MEMORY = not _is_npu
|
||||||
if SUPPORT_PIN_MEMORY:
|
|
||||||
logger.warning("Current platform not support pin_memory")
|
|
||||||
|
|
||||||
|
|
||||||
def synchronized(func):
|
def synchronized(func):
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ except ImportError:
|
|||||||
class IdGenerator:
|
class IdGenerator:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
logger.info("opentelemetry package is not installed, tracing disabled")
|
logger.debug("opentelemetry package is not installed, tracing disabled")
|
||||||
|
|
||||||
|
|
||||||
def is_tracing_enabled() -> bool:
|
def is_tracing_enabled() -> bool:
|
||||||
|
|||||||
Reference in New Issue
Block a user