Skip to content

Commit 4b79bfb

Browse files
committedMar 3, 2025
nccl ops address review
1 parent 9cf0e21 commit 4b79bfb

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed
 

‎tests/py/dynamo/distributed/distributed_utils.py

+1-15
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@ def set_environment_variables_pytest():
1616
os.environ["USE_TRTLLM_PLUGINS"] = "1"
1717

1818

19-
def find_repo_root(max_depth=10):
20-
dir_path = os.path.dirname(os.path.realpath(__file__))
21-
for i in range(max_depth):
22-
files = os.listdir(dir_path)
23-
if "MODULE.bazel" in files:
24-
return dir_path
25-
else:
26-
dir_path = os.path.dirname(dir_path)
27-
28-
raise RuntimeError("Could not find repo root")
29-
30-
3119
def initialize_logger(rank, logger_file_name):
3220
logger = logging.getLogger()
3321
logger.setLevel(logging.INFO)
@@ -49,9 +37,7 @@ def initialize_distributed_env(logger_file_name, rank=0, world_size=1, port=2950
4937
os.environ["WORLD_SIZE"] = str(world_size)
5038
os.environ["MASTER_ADDR"] = "127.0.0.1"
5139
os.environ["MASTER_PORT"] = str(port)
52-
os.environ["TRTLLM_PLUGINS_PATH"] = (
53-
find_repo_root() + "/lib/libnvinfer_plugin_tensorrt_llm.so"
54-
)
40+
os.environ["TRTLLM_PLUGINS_PATH"] = "./tmp/lib/libnvinfer_plugin_tensorrt_llm.so"
5541

5642
# Necessary to assign a device to each rank.
5743
torch.cuda.set_device(local_rank)

‎tests/py/dynamo/distributed/test_nccl_ops.sh

+3-8
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,15 @@ echo "Setting up the environment"
7272

7373
OS="$(uname -s)"
7474
ARCH="$(uname -m)"
75-
PYTHON_VERSION="$(python3 -c 'import sys; print(f"cp{sys.version_info.major}{sys.version_info.minor}")')"
7675

7776

7877
#getting the file name for TensorRT-LLM download
79-
if [[ "$OS" == "Linux" && "$ARCH" == "x86_64" && "$PYTHON_VERSION" == "cp312" ]]; then
78+
if [[ "$OS" == "Linux" && "$ARCH" == "x86_64"]]; then
8079
FILE="tensorrt_llm-0.17.0.post1-cp312-cp312-linux_x86_64.whl"
81-
elif [[ "$OS" == "Linux" && "$ARCH" == "aarch64" && "$PYTHON_VERSION" == "cp312" ]]; then
80+
elif [[ "$OS" == "Linux" && "$ARCH" == "aarch64"]]; then
8281
FILE="tensorrt_llm-0.17.0.post1-cp312-cp312-linux_aarch64.whl"
83-
elif [[ "$OS" == "Linux" && "$ARCH" == "x86_64" && "$PYTHON_VERSION" == "cp310" ]]; then
84-
FILE="tensorrt_llm-0.17.0.post1-cp310-cp310-linux_x86_64.whl"
85-
elif [[ "$OS" == "Linux" && "$ARCH" == "aarch64" && "$PYTHON_VERSION" == "cp310" ]]; then
86-
FILE="tensorrt_llm-0.17.0.post1-cp310-cp310-linux_aarch64.whl"
8782
else:
88-
echo "Unsupported platform: OS=$OS ARCH=$ARCH PYTHON=$PYTHON_VERSION"
83+
echo "Unsupported platform: OS=$OS ARCH=$ARCH
8984
exit 1
9085
fi
9186

0 commit comments

Comments
 (0)
Failed to load comments.