Skip to content

Commit 7d4fe5b

Browse files
authored
[MPQEditor] IntroduceMPQSelectionPanel (#1533)
This commit introduces MPQSelectionPanel for manual mixed precision quantization task. ONE-vscode-DCO-1.0-Signed-off-by: s.malakhov <[email protected]>
1 parent 5918455 commit 7d4fe5b

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

src/MPQEditor/MPQCircleSelector.ts

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import * as vscode from "vscode";
18+
19+
import {
20+
CircleGraphCtrl,
21+
CircleGraphEvent,
22+
} from "../CircleGraph/CircleGraphCtrl";
23+
24+
export interface MPQSelectionEvent {
25+
onSelection(names: string[], document: vscode.TextDocument): void;
26+
onClosed(panel: vscode.WebviewPanel): void;
27+
onOpened(panel: vscode.WebviewPanel): void;
28+
}
29+
30+
export type MPQSelectionCmdOpenArgs = {
31+
modelPath: string;
32+
document: vscode.TextDocument;
33+
names: any;
34+
panel: vscode.WebviewPanel;
35+
};
36+
37+
export class MPQSelectionPanel
38+
extends CircleGraphCtrl
39+
implements CircleGraphEvent
40+
{
41+
public static readonly viewType = "one.viewer.mpq";
42+
43+
public static panels: MPQSelectionPanel[] = [];
44+
45+
public static register(_context: vscode.ExtensionContext): void {}
46+
47+
private constructor(
48+
panel: vscode.WebviewPanel,
49+
extensionUri: vscode.Uri,
50+
_args: MPQSelectionCmdOpenArgs,
51+
_handler: MPQSelectionEvent | undefined
52+
) {
53+
super(extensionUri, panel.webview);
54+
// TODO
55+
}
56+
57+
public dispose() {
58+
//TODO
59+
}
60+
61+
/**
62+
* CircleGraphEvent interface implementations
63+
*/
64+
public onViewMessage(_message: any) {
65+
// TODO
66+
}
67+
}

0 commit comments

Comments
 (0)