MCPcopy Index your code
hub / github.com/NVIDIA/TensorRT-LLM / generate_condition_entry

Function generate_condition_entry

scripts/generate_config_database_tests.py:161–175  ·  view source on GitHub ↗
(
    gpu_name: str, num_gpus: int, config_name: str, server_names: list
)

Source from the content-addressed store, hash-verified

159
160
161def generate_condition_entry(
162 gpu_name: str, num_gpus: int, config_name: str, server_names: list
163) -> dict:
164 # using copy.deepcopy to avoid creating YAML anchors
165 wildcards = copy.deepcopy(GPU_WILDCARDS[gpu_name])
166 condition = {
167 "wildcards": wildcards,
168 "ranges": {"system_gpu_count": {"gte": num_gpus}},
169 }
170
171 tests = [
172 f"perf/test_perf_sanity.py::test_e2e[aggr_upload-{config_name}-{name}]"
173 for name in server_names
174 ]
175 return {"condition": condition, "tests": tests}
176
177
178def generate_tests(test_list_path: Path = TEST_LIST_PATH, test_config_dir: Path = PERF_SANITY_DIR):

Callers 1

generate_testsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected