Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TensorRT LLM
[![python](https://img.shields.io/badge/python-3.10-green)](https://www.python.org/downloads/release/python-31012/)
[![cuda](https://img.shields.io/badge/cuda-13.2.1-green)](https://developer.nvidia.com/cuda-downloads)
[![torch](https://img.shields.io/badge/torch-2.11.0-green)](https://pytorch.org)
[![version](https://img.shields.io/badge/release-1.3.0rc22-green)](https://github.com/NVIDIA/TensorRT-LLM/blob/main/tensorrt_llm/version.py)
[![version](https://img.shields.io/badge/release-1.3.0rc23-green)](https://github.com/NVIDIA/TensorRT-LLM/blob/main/tensorrt_llm/version.py)
[![license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/NVIDIA/TensorRT-LLM/blob/main/LICENSE)

[Architecture](https://nvidia.github.io/TensorRT-LLM/developer-guide/overview.html)   |   [Performance](https://nvidia.github.io/TensorRT-LLM/developer-guide/perf-overview.html)   |   [Examples](https://nvidia.github.io/TensorRT-LLM/quick-start-guide.html)   |   [Documentation](https://nvidia.github.io/TensorRT-LLM/)   |   [Roadmap](https://github.com/NVIDIA/TensorRT-LLM/issues?q=is%3Aissue%20state%3Aopen%20label%3Aroadmap)
Expand Down
218 changes: 208 additions & 10 deletions docs/source/_static/config_db.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/source/_static/config_selector.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */
/* SPDX-License-Identifier: Apache-2.0 */

.trtllm-config-selector {
border: 1px solid var(--pst-color-shadow);
border-radius: 14px;
Expand Down Expand Up @@ -29,6 +32,10 @@
align-items: start;
}

.trtllm-config-selector__field[hidden] {
display: none;
}

.trtllm-config-selector__label {
display: flex;
align-items: center;
Expand Down
95 changes: 83 additions & 12 deletions docs/source/_static/config_selector.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

(function () {
"use strict";

let dbPromise = null;
let widgetId = 0;
const GROUP_ORDER = ["model", "topology", "islOsl", "concurrency"];
const GROUP_ORDER = ["model", "topology", "islOsl", "concurrency", "profile"];
const GROUP_LABELS = {
model: "Model",
topology: "GPU(s)",
islOsl: "ISL / OSL",
concurrency: "Concurrency",
profile: "Profile",
};

function $(root, sel) {
Expand Down Expand Up @@ -58,6 +62,7 @@
state.concurrency != null && state.concurrency !== ""
? String(state.concurrency)
: "",
profile: state.profile || "",
};
}

Expand Down Expand Up @@ -138,9 +143,22 @@

function profileLabel(profile) {
const text = String(profile || "").trim();
const labels = {
latency: "Latency",
balanced: "Balanced",
throughput: "Throughput",
};
if (labels[text]) return labels[text];
return text || "Unknown Profile";
}

function profileOption(profile) {
return {
value: profile,
label: profileLabel(profile),
};
}

function formatProfileSummary(profiles) {
const labels = uniqBy(profiles.map((profile) => profileLabel(profile)), (label) => label);
if (!labels.length) {
Expand Down Expand Up @@ -194,7 +212,12 @@
.map((group) => concurrencyOption(group))
.sort((a, b) => sortNums(a.concurrency, b.concurrency));

return { model, topology, islOsl, concurrency };
const profile = uniqBy(
entries.filter((entry) => entry.profile).map((entry) => profileOption(entry.profile)),
(option) => option.value
);

return { model, topology, islOsl, concurrency, profile };
}

function filterEntriesByState(entries, state) {
Expand All @@ -214,6 +237,9 @@
if (normalizedState.concurrency) {
if (String(entry.concurrency) !== normalizedState.concurrency) return false;
}
if (normalizedState.profile && entry.profile !== normalizedState.profile) {
return false;
}
return true;
});
}
Expand Down Expand Up @@ -362,7 +388,8 @@
normalizedState.model &&
normalizedState.topology &&
normalizedState.islOsl &&
normalizedState.concurrency
normalizedState.concurrency &&
(!groups.profile.options.length || normalizedState.profile)
) {
return "Selection did not resolve to a single configuration.";
}
Expand All @@ -389,6 +416,12 @@
};
}

function validatedCommitUrl(commit) {
const normalized = String(commit || "").trim().toLowerCase();
if (!/^[0-9a-f]{40}$/.test(normalized)) return "";
return `https://github.com/NVIDIA/TensorRT-LLM/commit/${normalized}`;
}

function isFileProtocol() {
return window.location.protocol === "file:";
}
Expand Down Expand Up @@ -608,14 +641,14 @@
: allCurated
).map(normalizeEntry);

// curatedIndex lives outside normalizeState's scope — it is preserved
// across Object.assign(state, view.state) because normalizeState only
// touches the four filter keys.
// curatedIndex lives outside normalizeState's scope and is preserved
// across Object.assign(state, view.state).
const state = {
model: "",
topology: "",
islOsl: "",
concurrency: "",
profile: "",
curatedIndex: null,
};

Expand Down Expand Up @@ -685,6 +718,7 @@
const selTopo = mkOptionGroup("GPU(s)", 2);
const selSeq = mkOptionGroup("ISL / OSL", 3);
const selConc = mkSelectField("Concurrency", `trtllm-conc-${id}`, 4);
const selProfile = mkSelectField("Profile", `trtllm-profile-${id}`, 5);

form.appendChild(selModel.wrap);

Expand All @@ -707,6 +741,7 @@
form.appendChild(selTopo.wrap);
form.appendChild(selSeq.wrap);
form.appendChild(selConc.wrap);
form.appendChild(selProfile.wrap);

const output = el("div", { class: "trtllm-config-selector__output" });
const cmdPre = el("pre", { class: "trtllm-config-selector__cmd" }, [
Expand Down Expand Up @@ -835,7 +870,10 @@
return { type: "model-select" };
}
if (activeEl === selConc.select) {
return { type: "select" };
return { type: "select", key: "concurrency" };
}
if (activeEl === selProfile.select) {
return { type: "select", key: "profile" };
}
if (
activeEl.classList &&
Expand All @@ -857,7 +895,8 @@
return;
}
if (descriptor.type === "select") {
selConc.select.focus();
if (descriptor.key === "profile") selProfile.select.focus();
else selConc.select.focus();
return;
}
if (descriptor.type !== "button") return;
Expand Down Expand Up @@ -997,16 +1036,16 @@
selectEl.dataset.status = (selectedOption && selectedOption.status) || "idle";
}

function setSelectOptions(selectEl, group) {
const previousValue = state.concurrency || "";
function setSelectOptions(selectEl, group, stateKey, placeholder) {
const previousValue = state[stateKey] || "";
const visibleOptions = group.options.filter(
(option) => option.status !== "incompatible"
);
selectEl.innerHTML = "";
selectEl.appendChild(
el("option", {
value: "",
text: visibleOptions.length ? "Select concurrency" : "No concurrency available",
text: visibleOptions.length ? `Select ${placeholder}` : `No ${placeholder} available`,
})
);
for (const option of visibleOptions) {
Expand Down Expand Up @@ -1077,7 +1116,12 @@

setOptionButtons(selTopo.options, "topology", view.groups.topology);
setOptionButtons(selSeq.options, "islOsl", view.groups.islOsl);
setSelectOptions(selConc.select, view.groups.concurrency);
setSelectOptions(selConc.select, view.groups.concurrency, "concurrency", "concurrency");
const hasProfileChoices =
Boolean(view.state.concurrency) &&
view.groups.profile.options.some((option) => option.status !== "incompatible");
selProfile.wrap.hidden = !hasProfileChoices;
setSelectOptions(selProfile.select, view.groups.profile, "profile", "profile");

const code = cmdPre.querySelector("code");
if (curatedSelected) {
Expand Down Expand Up @@ -1132,6 +1176,26 @@
} else {
meta.appendChild(el("span", { text: e.config_path || "" }));
}
if (e.validated_trtllm_version) {
meta.appendChild(
el("span", {
text: ` \u00b7 Validated with TensorRT-LLM ${e.validated_trtllm_version}`,
})
);
}
const commitUrl = validatedCommitUrl(e.validated_trtllm_commit);
if (commitUrl) {
meta.appendChild(el("span", { text: " \u00b7 Commit: " }));
meta.appendChild(
el("a", {
class: "trtllm-config-selector__configLink",
href: commitUrl,
target: "_blank",
rel: "noopener",
text: e.validated_trtllm_commit.slice(0, 12),
})
);
}

currentEntry = e;
resetYamlPanel();
Expand Down Expand Up @@ -1161,6 +1225,12 @@

selConc.select.addEventListener("change", () => {
state.concurrency = selConc.select.value;
state.profile = "";
render();
});

selProfile.select.addEventListener("change", () => {
state.profile = selProfile.select.value;
render();
});

Expand Down Expand Up @@ -1218,6 +1288,7 @@
formatCuratedCommand: formatCommand,
nextStateAfterSelection,
normalizeState,
validatedCommitUrl,
};
}

Expand Down
Loading
Loading