Skip to content

Commit 6e0e443

Browse files
committed
fix - change runfiles
1 parent d41a0f6 commit 6e0e443

File tree

4 files changed

+87
-275
lines changed

4 files changed

+87
-275
lines changed

rtp_llm/test/utils/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ py_binary(
2727
name = "gpu_lock",
2828
deps = [":torch"],
2929
main = "device_resource.py",
30-
srcs = ["device_resource.py"],
30+
srcs = [
31+
"device_resource.py",
32+
"jit_sys_path_setup.py",
33+
],
3134
)
3235

3336
py_library(

rtp_llm/test/utils/bootstrap_runner.py

Lines changed: 0 additions & 212 deletions
This file was deleted.

rtp_llm/test/utils/device_resource.py

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,10 @@ def __exit__(self, *args: Any):
128128

129129
sys.exit(result.returncode)
130130
else:
131-
if "H20" in cuda_info[0]:
132-
# Setup JIT cache and create Bootstrap script
133-
try:
134-
from jit_sys_path_setup import setup_jit_cache_and_create_bootstrap
135-
136-
bootstrap_script = setup_jit_cache_and_create_bootstrap()
137-
except Exception as e:
138-
logging.warning(f"JIT setup failed: {e}, will run without Bootstrap")
139-
bootstrap_script = None
140-
141-
# Prepare test command
142-
if bootstrap_script:
143-
# Use Bootstrap wrapper
144-
test_command = [sys.executable, bootstrap_script] + sys.argv[1:]
145-
else:
146-
# Fallback to direct execution
147-
test_command = sys.argv[1:]
131+
from jit_sys_path_setup import setup_jit_cache
132+
133+
setup_jit_cache()
134+
148135
device_name, _ = cuda_info
149136
require_count = int(
150137
os.environ.get("WORLD_SIZE", os.environ.get("GPU_COUNT", "1"))
@@ -155,11 +142,6 @@ def __exit__(self, *args: Any):
155142
else:
156143
env_name = "CUDA_VISIBLE_DEVICES"
157144
os.environ[env_name] = ",".join(gpu_resource.gpu_ids)
158-
result = subprocess.run(test_command)
145+
result = subprocess.run(sys.argv[1:])
159146
logging.info("exitcode: %d", result.returncode)
160-
161-
# Cleanup Bootstrap script
162-
if bootstrap_script and os.path.exists(bootstrap_script):
163-
os.unlink(bootstrap_script)
164-
165147
sys.exit(result.returncode)

0 commit comments

Comments
 (0)