-
Notifications
You must be signed in to change notification settings - Fork 685
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
Lx add profile #8889
Lx add profile #8889
Conversation
result_list.append(table_line) | ||
|
||
doc_test_ratio = cnt0 * 1.0 / len(api_list) | ||
compatiable_completeness_test_ratio = cnt1 * 1.0 / len(api_list) | ||
exception_test_ratio = cnt2 * 1.0 / len(api_list) | ||
performance_test_ratio = cnt3 * 1.0 / len(api_list) |
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.
Python 里 / 就是浮点除法,不需要 * 1.0,方便的话可以把这四行都改一下
) | ||
|
||
cnt0 = 0 # the number of doc_test | ||
cnt1 = 0 # the number of compatiable_completeness_test | ||
cnt2 = 0 # the number of exception_test | ||
|
||
cnt3 = 0 # the number of profile_test |
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.
这一行之后应该空一行
result_profile_func_list = [] | ||
for file in files: | ||
if file!="log" and not os.path.isdir(file) and file.find("__pycache__") == -1: | ||
f = open(path + "/" + file) |
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.
不要用这种直接字符串拼接的方式,这种方式在 windows 下就不工作了(windows 不用 "/" 而是用 "\")。请改用 os.path.join 来拼接,可以顺便把另一处已有的代码也改了。如果有兴趣也可以了解下更现代、更方便的 pathlib。
Speed stats:
|
Speed stats:
|
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8889/ |
CI failed when running job: cuda-misc. PR label automerge has been removed |
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8889/ |
Speed stats:
|
CI failed when running job: cuda-misc. PR label automerge has been removed |
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8889/ |
Speed stats:
|
CI failed when running job: cuda-misc. PR label automerge has been removed |
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8889/ |
Speed stats:
|
为oneflow/python/oneflow/test/modules下的文件
test_abs.py 和test_activate.py 中的算子增加性能测试profile