Add TPU backend for general_perf and llm_perf #119
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1.1 general_perf/backends/CPU/calculate_cpu_diff.sh 判断后端是否为TPU,若是则跳过venv
1.2 general_perf/launch.py 调用上述sh时增加传参hardware_type
1.3 general_perf/launch.py 当compile_only为true时,修复传参错误导致解析workload失败的问题
1.4 general_perf/core/perf_engine.py 修改了更安全的获取cpu型号代码。旧代码在某些情况下获取失败时会导致程序崩溃
1.5 general_perf/backends/CPU/ 后端文件将import torch提到import tensorflow之前,因为在sophgo/tpuc_dev中按照旧顺序import时进程会卡死
1.6 general_perf/backends/runtime_backend.py 修复了load()方法的注释
目前只测试了fp32 1b的resnet50和yolov5,后续会补充测试内容及完善README。