-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add ViT model for FlagPerf #200
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FLAGPERF_PATH: "/home/FlagPerf/inference" | ||
FLAGPERF_PATH: "/home/zangzhan/flagperf/FlagPerf/inference" | ||
FLAGPERF_LOG_PATH: "result" | ||
VENDOR: "nvidia" | ||
VENDOR: "kunlunxin" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 个人修改不用提交,复原即可 |
||
FLAGPERF_LOG_LEVEL: "INFO" | ||
LOG_CALL_INFORMATION: True | ||
HOSTS: ["127.0.0.1"] | ||
|
@@ -13,4 +13,4 @@ PIP_SOURCE: "https://mirror.baidu.com/pypi/simple" | |
CLEAR_CACHES: True | ||
ACCE_VISIBLE_DEVICE_ENV_NAME: "CUDA_VISIBLE_DEVICES" | ||
CASES: | ||
"resnet50:pytorch_1.13": "/raid/dataset/ImageNet/imagenet/val" | ||
"vit_l_16:pytorch_1.13": "/home/zangzhan/val" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 个人修改不用提交,复原即可 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
compiler: xtcl | ||
# skip validation(will also skip create_model, export onnx). Assert exist_onnx_path != null | ||
no_validation: true | ||
# set a real onnx_path to use exist, or set it to anything but null to avoid export onnx manually(like torch-tensorrt) | ||
exist_onnx_path: /home/zangzhan/flagperf/FlagPerf/inference/onnxs/vit_l_16_bs32_pytorch_fp16False.onnx | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里是否需要隐藏个人信息?比如改成/home/FlagPerf/inference/...,不改也OK |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
def analysis_log(logpath): | ||
logfile = open(logpath) | ||
|
||
max_usage = 0.0 ## usage_mem | ||
max_mem = 0.0 | ||
for line in logfile.readlines(): | ||
''' | ||
xpu_smi temp power mem w_mem use_rate | ||
''' | ||
if "xpu_smi" in line: | ||
line = line[:-1] | ||
usage = line.split(" ")[4] | ||
usage = float(usage) | ||
max_usage = max(max_usage, usage) | ||
max_mem = line.split(" ")[5] | ||
max_mem = float(max_mem) | ||
|
||
return round(max_usage / 1024.0, | ||
2), round(max_mem / 1024.0, 2), eval("32e12"), eval("128e12") | ||
|
||
|
||
if __name__ == "__main__": | ||
max1, max2, max2,max4 = analysis_log("/home/zhoujiamin01/workspace/zjm_flag/FlagPerf/inference/result/run20230809192313/resnet50:pytorch_1.13/127.0.0.1_noderank0/kunlunxin_monitor.log") | ||
def analysis_log(logpath): | ||
logfile = open(logpath) | ||
|
||
max_usage = 0.0 ## usage_mem | ||
max_mem = 0.0 | ||
for line in logfile.readlines(): | ||
''' | ||
xpu_smi temp power mem w_mem use_rate | ||
''' | ||
if "xpu_smi" in line: | ||
line = line[:-1] | ||
usage = line.split(" ")[4] | ||
usage = float(usage) | ||
max_usage = max(max_usage, usage) | ||
max_mem = line.split(" ")[5] | ||
max_mem = float(max_mem) | ||
|
||
return round(max_usage / 1024.0, | ||
2), round(max_mem / 1024.0, 2), eval("32e12"), eval("128e12") | ||
|
||
|
||
if __name__ == "__main__": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. test用的入口可删除 |
||
max1, max2, max2,max4 = analysis_log("/home/zhoujiamin01/workspace/zjm_flag/FlagPerf/inference/result/run20230809192313/resnet50:pytorch_1.13/127.0.0.1_noderank0/kunlunxin_monitor.log") | ||
|
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.
个人修改不用提交,复原即可