diff --git a/media/MPQEditor/index.html b/media/MPQEditor/index.html index dafdbf28..ae53dd8d 100644 --- a/media/MPQEditor/index.html +++ b/media/MPQEditor/index.html @@ -32,20 +32,33 @@
-
- - - uint8 - int16 - -
-
- - - layer - channel - -
+ + + +
+ Default Parameters + + + Default quantization parameters: 'Quantized Data Type' and 'Granularity' respectively + + +
+
+ + + uint8 + int16 + + + + + layer + channel + + +
+
@@ -58,27 +71,29 @@
- - - - visq.json file with layer-wise quantization errors - - - - - - Show Graph + Show Graph
-
- - +
+ + Name - Quantization + DType Granularity   -
+
+
+ + + + visq.json file with layer-wise quantization errors + + + + + +
diff --git a/media/MPQEditor/index.js b/media/MPQEditor/index.js index d0c78f97..0c1b3e45 100644 --- a/media/MPQEditor/index.js +++ b/media/MPQEditor/index.js @@ -68,7 +68,7 @@ function handleVisqFileLoaded(visqFile) { function registerMainControls() { document .getElementById("DefaultDtype") - .addEventListener("click", function () { + .addEventListener("change", function () { updateDefaultQuantization(); applyUpdates(); }); @@ -127,6 +127,7 @@ function registerMainControls() { function displayMPQToEditor(mpqCfg) { document.getElementById("DefaultDtype").value = mpqCfg?.["default_quantization_dtype"]; + document.getElementById("DefaultGranularity").value = mpqCfg?.["default_granularity"]; @@ -142,7 +143,8 @@ function displayMPQToEditor(mpqCfg) { } const layersTable = document.getElementById("LayersTable"); - layersTable.replaceChildren(); + let header = document.getElementById("LayersHeader"); + layersTable.replaceChildren(header); addQuantizedNodes(names, quantization, granularity, false); } @@ -303,20 +305,18 @@ function updateSpecificGranularity(name) { } function updateDefaultQuantization() { - let value = document.getElementById("DefaultDtype").value; vscode.postMessage({ type: "updateSection", section: "default_quantization_dtype", - value: value, + value: document.getElementById("DefaultDtype").value, }); } function updateGranularity() { - let value = document.getElementById("DefaultGranularity").value; vscode.postMessage({ type: "updateSection", section: "default_granularity", - value: value, + value: document.getElementById("DefaultGranularity").value, }); } diff --git a/media/MPQEditor/style.css b/media/MPQEditor/style.css index a3de1988..ecd2df28 100644 --- a/media/MPQEditor/style.css +++ b/media/MPQEditor/style.css @@ -21,6 +21,9 @@ white-space: pre-wrap; body { min-width: 500px; width: auto !important; +display: flex; +flex-flow: column; +height: 100vh; } .leftbtns { @@ -49,3 +52,16 @@ font-family: var(--vscode-font-family); .codicon.codicon-question:hover .help { visibility: visible; } + +.layers { +flex: 1 1 auto; +overflow-y: auto; +} + +.bottom { +flex: 0 1 auto; +} + +.text { +margin-top: 10px; +}