[libc-commits] [libc] [libc] Add Multithreaded GPU Benchmarks (PR #98964)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Wed Jul 17 14:13:38 PDT 2024
================
@@ -104,6 +107,11 @@ class Benchmark {
#define BENCHMARK(SuiteName, TestName, Func) \
LIBC_NAMESPACE::benchmarks::Benchmark SuiteName##_##TestName##_Instance( \
- Func, #SuiteName "." #TestName)
+ Func, #SuiteName "." #TestName, 0)
+
+#define SINGLE_THREADED_BENCHMARK(SuiteName, TestName, Func) \
+ LIBC_NAMESPACE::benchmarks::Benchmark SuiteName##_##TestName##_Instance( \
+ Func, #SuiteName "." #TestName, \
+ LIBC_NAMESPACE::benchmarks::BenchmarkFlags::SINGLE_THREADED)
----------------
jhuber6 wrote:
I'm thinking that we might want a `SINGLE_WAVE_BENCHMARK`. And what that can do is just call `gpu::get_lane_size()` and mask off all the threads above a single lane.
https://github.com/llvm/llvm-project/pull/98964
More information about the libc-commits
mailing list