-
Notifications
You must be signed in to change notification settings - Fork 45
[Feature] Add eval_backend_diff & eval_backend_perf to replace test_compiler / test_device #571
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
base: develop
Are you sure you want to change the base?
Conversation
|
Thanks for your contribution! |
| test_multi_models(args) | ||
|
|
||
|
|
||
| def complete_default_args( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个函数不要删掉。你改名成check_or_complete_args。
它对阅读代码很有用,告诉读者都有哪些参数。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前移动到了eval_backend_perf中
| ("--seed", str(env_args.seed)), | ||
| ("--compiler", env_args.compiler), | ||
| ("--device", env_args.device), | ||
| ("--op-lib", env_args.op_lib), | ||
| ("--warmup", str(env_args.warmup)), | ||
| ("--trials", str(env_args.trials)), | ||
| ("--log-prompt", env_args.log_prompt), | ||
| ("--model-path-prefix", env_args.model_path_prefix), | ||
| ("--config", env_args.backend_config), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
换成json形式。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的抽象很不干净,必须换成json config才行。
既然eval_backend_diff的大部分工作由eval_backend_perf来完成。那么eval_backend_diff需要尽可能少的感知eval_backend_perf的知识。eval_backend_perf所需的配置直接由调用层来制定,eval_backend_diff只负责传递一下数据。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
PR Category
Feature
Description
Usage:
python3 -m graph_net_bench.torch.eval_backend_diff \ --model-path-list $model_list \ --eval-config=$(base64 -w 0 <<EOF { "reference_config": { "seed": int, "compiler": str, "device": str, "op_lib": str, "warmup": int, "trials": int, "log_prompt": str, "model_path_prefix": str, "backend_config": dict }, "target_config": { "seed": int, "compiler": str, "device": str, "op_lib": str, "warmup": int, "trials": int, "log_prompt": str, "model_path_prefix": str, "backend_config": dict } } EOF ) \TODO
目前为能跑通的初始版本,有很大优化空间: