-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend the strategy capability for adding the new data type (#555)
* refined the tuning space Signed-off-by: yiliu30 <[email protected]> * fixed the merge with user cfg Signed-off-by: yiliu30 <[email protected]> * parse tuning space Signed-off-by: yiliu30 <[email protected]> * refined the tuning space Signed-off-by: yiliu30 <[email protected]> * clean code Signed-off-by: yiliu30 <[email protected]> * refine the logical Signed-off-by: yiliu30 <[email protected]> * fixed the pylint error Signed-off-by: yiliu30 <[email protected]> * fixed the typo Signed-off-by: yiliu30 <[email protected]> * fix typo Signed-off-by: yiliu30 <[email protected]> * fixed the merge Signed-off-by: yiliu30 <[email protected]> * fixed the auto quant Signed-off-by: yiliu30 <[email protected]> * fixed quant_mode error Signed-off-by: yiliu30 <[email protected]> * revert some change Signed-off-by: yiliu30 <[email protected]> * clean code Signed-off-by: yiliu30 <[email protected]> * add ut for int4 Signed-off-by: yiliu30 <[email protected]> * fixed the parse order Signed-off-by: yiliu30 <[email protected]> --------- Signed-off-by: yiliu30 <[email protected]>
- Loading branch information
Showing
12 changed files
with
996 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (c) 2023 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Strategy constant.""" | ||
|
||
PRECISION_SET = {'bf16', 'fp16' , 'fp32',} | ||
QUANT_MODE_SET = {'static', 'dynamic'} | ||
QUNAT_BIT_SET = {'int8', 'uint8', 'int4', 'uint4'} | ||
|
||
TUNING_ITEMS_LST = [('activation','scheme'), ('activation','algorithm'), ('activation','granularity'), | ||
('weight','scheme'), ('weight','algorithm'), ('weight','granularity'), 'sampling_size'] | ||
|
||
PRECISION_SET_V2_0 = {'fp32', 'bf16'} | ||
|
||
auto_query_order = ['static', 'dynamic', 'bf16', 'fp16', 'fp32'] | ||
static_query_order = ['static', 'bf16', 'fp16', 'fp32'] | ||
dynamic_query_order = ['dynamic', 'bf16', 'fp16', 'fp32'] |
Oops, something went wrong.