Skip to content

Conversation

@JewelRoam
Copy link
Collaborator

@JewelRoam JewelRoam commented Jan 15, 2026

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

目前为能跑通的初始版本,有很大优化空间:

  • 添加output文件传递和rpc支持,取代原有test_device
  • (done)改进函数及config中参数的语义
  • (done)把编译器的注册改为根据config.compiler动态链接,算子库加载暂时不变
  • (done)将命令行args传递改为JSON config:既然eval_backend_diff的大部分工作由eval_backend_perf来完成,那么eval_backend_diff需要尽可能少的感知eval_backend_perf的知识。eval_backend_perf所需的配置直接由调用层来制定,eval_backend_diff只负责传递一下数据。
  • ……待补充

@paddle-bot
Copy link

paddle-bot bot commented Jan 15, 2026

Thanks for your contribution!

test_multi_models(args)


def complete_default_args(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个函数不要删掉。你改名成check_or_complete_args。
它对阅读代码很有用,告诉读者都有哪些参数。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前移动到了eval_backend_perf中

Comment on lines 229 to 237
("--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),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

换成json形式。

Copy link
Collaborator

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只负责传递一下数据。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@JewelRoam JewelRoam changed the title Add eval_backend_perf to further refactor previous test_compiler [Feature] Add eval_backend_perf to further refactor previous test_compiler Jan 16, 2026
@JewelRoam JewelRoam changed the title [Feature] Add eval_backend_perf to further refactor previous test_compiler [Feature] Add eval_backend_perf to replace test_compiler Jan 16, 2026
@JewelRoam JewelRoam changed the title [Feature] Add eval_backend_perf to replace test_compiler [Feature] Add eval_backend_diff & eval_backend_perf to replace test_compiler & test_device Jan 16, 2026
@JewelRoam JewelRoam changed the title [Feature] Add eval_backend_diff & eval_backend_perf to replace test_compiler & test_device [Feature] Add eval_backend_diff & eval_backend_perf to replace test_compiler / test_device Jan 16, 2026
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

Successfully merging this pull request may close these issues.

2 participants