-
Notifications
You must be signed in to change notification settings - Fork 801
[CI][benchmarks] Modify benchmark scripts and CI workflow to enable gdb_mode #20891
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: sycl
Are you sure you want to change the base?
Conversation
56320bf to
9de028f
Compare
9de028f to
42f6390
Compare
42f6390 to
e179b9f
Compare
e179b9f to
1cae956
Compare
1cae956 to
a4c9fed
Compare
a4c9fed to
c2805eb
Compare
…ugging benchmarks
| default: '' | ||
| gdb_mode: | ||
| type: string | ||
| required: False |
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.
pls add default = false
| Extra options to be added to LIT_OPTS. | ||
| type: string | ||
| default: '' | ||
| gdb_mode: |
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.
pls move below and add to the name prefix benchmark_
| echo "::endgroup::" | ||
| echo "::group::run_benchmarks" | ||
| export LLVM_BENCHMARKS_USE_GDB=${LLVM_BENCHMARKS_USE_GDB} |
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.
when is LLVM_BENCHMARKS_USE_GDB set?
| if is_gdb_benchmarks: | ||
| return [(0.0, 0.0)] | ||
|
|
||
| else: |
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.
no need for else, since you returned on the if (this way we don't need extra tab for the rest of the code
| f"-DUSE_SYSTEM_LEVEL_ZERO=OFF", | ||
| f"-DCMAKE_CXX_COMPILER=clang++", | ||
| f"-DCMAKE_C_COMPILER=clang", | ||
| f"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG -fdebug-info-for-profiling", |
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.
perhaps we should only add these when GDB is enabled...?
| command = command.split() | ||
|
|
||
| is_gdb_benchmarks = os.environ.get("LLVM_BENCHMARKS_USE_GDB", "") == "true" | ||
| if command[0] == "taskset" and is_gdb_benchmarks: |
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.
why do we check if taskset is the first part of the command?
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.
I did it so gdb is used only for commands which are responsible for running benchmarks as it looks like that 'taskset', '-c', '0,1,2,3', '/tmp/tmp7nhle4ge/compute-benchmarks-build/bin/torch_benchmark_l0', '--test=KernelSubmitMultiQueue', '--csv', '--noHeaders', '--iterations=3', '--workgroupCount=4096', '--workgroupSize=512', '--kernelsPerQueue=20'
I don't think we need gdb for any other command which are executed in out benchmarks as this extends time of execution of the script.
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.
can it be not the first one? e.g. in command like PATH=<...> taskset <...>? just asking, dunno.
| f"-DCMAKE_CXX_COMPILER=clang++", | ||
| f"-DCMAKE_C_COMPILER=clang", | ||
| f"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG -fdebug-info-for-profiling", | ||
| f"-DCMAKE_BUILD_TYPE=RelWithDebInfo", |
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.
Modify the GitProject class, there is a default Release version set for all projects.
Modify benchmark scripts and CI workflow to enable gdb_mode on workflow_dispatch while deugging benchmarks.