Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set platform_settings while expand new backend? #1

Open
SunCrazy opened this issue May 9, 2023 · 3 comments
Open

How to set platform_settings while expand new backend? #1

SunCrazy opened this issue May 9, 2023 · 3 comments

Comments

@SunCrazy
Copy link

SunCrazy commented May 9, 2023

Hi,
Could you please provide the complete platform settings that can be modified?

I want to expand a new backend to deploy model, and need know that what kind of valid arguments that i can set.

Thanks

@gushiqiao
Copy link
Contributor

gushiqiao commented May 19, 2023

Firstly, you need to write the quantitative configuration of the new platform in the "dipoorlet/platform_settings.py" , using the "trt" platform as an example:
WXWorkCapture_16844853783587
And write the "{new_platform_name: new_platform settings}" of in the dictionary "platform_setting_table".
WXWorkCapture_16844862361994

Secondly, you need to create a file on generating new platform deployment configurations under the "dipoorlet/deploy/", with the file name "deploy_new_platform.py". At the same time, write a new function to output deployment configurations in this file and register the new platform through a registrar. Taking the "trt" platform as an example, the content in "dipoorlet/deploy/deploy_trt.py" is:
WXWorkCapture_16844861492138

Finally, you need to import the new function into the “dipoorlet/deploy/deploy_base.py”:
WXWorkCapture_16844863807670

At this point, a new platform is registered, and you can output the deployment configuration of the platform by using the "-D" and the name of the new platform.

@SunCrazy
Copy link
Author

Sorry for not clarifying the requirements.
In fact, I want to know that all possible config parameters in trt_platform_settings dict. In other words, what kinds of parameters I can set while add a new backend.

@gushiqiao
Copy link
Contributor

For example, the new platform can support quantization operator types ("quant_nodes"); hyperparameter (bit count, symmetric/asymmetric) of weighted quantization and activated quantization supported by new platform ("qi_params", "qw_params"), whether the platform supports quantization per channel ("per_channel"), etc. You need to determine these parameters based on the platform you want to add, and write the parameters of the new platform according to the parameter format of the existing platform (such as "trt_platform_settings").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants