Skip to content

Conversation

@luszczewskakasia1
Copy link
Contributor

Modify benchmark scripts and CI workflow to enable gdb_mode on workflow_dispatch while deugging benchmarks.

@luszczewskakasia1 luszczewskakasia1 force-pushed the luszczewskakasia1_add-gdb branch from 56320bf to 9de028f Compare December 15, 2025 09:12
@luszczewskakasia1 luszczewskakasia1 force-pushed the luszczewskakasia1_add-gdb branch from 9de028f to 42f6390 Compare December 15, 2025 09:18
@luszczewskakasia1 luszczewskakasia1 force-pushed the luszczewskakasia1_add-gdb branch from 42f6390 to e179b9f Compare December 15, 2025 09:20
@luszczewskakasia1 luszczewskakasia1 force-pushed the luszczewskakasia1_add-gdb branch from e179b9f to 1cae956 Compare December 15, 2025 10:08
@luszczewskakasia1 luszczewskakasia1 force-pushed the luszczewskakasia1_add-gdb branch from 1cae956 to a4c9fed Compare December 15, 2025 11:32
@luszczewskakasia1 luszczewskakasia1 force-pushed the luszczewskakasia1_add-gdb branch from a4c9fed to c2805eb Compare December 15, 2025 11:59
@luszczewskakasia1 luszczewskakasia1 marked this pull request as ready for review December 15, 2025 12:58
@luszczewskakasia1 luszczewskakasia1 requested review from a team as code owners December 15, 2025 12:58
default: ''
gdb_mode:
type: string
required: False
Copy link
Contributor

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:
Copy link
Contributor

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}
Copy link
Contributor

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:
Copy link
Contributor

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",
Copy link
Contributor

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:
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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",
Copy link
Contributor

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.

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.

4 participants