[libc-commits] [libc] [libc] NVPTX Profiling Draft (PR #92009)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue May 28 19:44:14 PDT 2024


================
@@ -0,0 +1,92 @@
+#include "LibcGpuBenchmark.h"
+#include "src/__support/CPP/algorithm.h"
+#include "src/__support/FPUtil/sqrt.h"
+#include "src/time/gpu/time_utils.h"
+
+namespace LIBC_NAMESPACE {
+namespace benchmarks {
+
+FixedVector<Benchmark *, 64> benchmarks_to_run;
+
+void Benchmark::add_benchmark(Benchmark *benchmark) {
+  benchmarks_to_run.push_back(benchmark);
+}
+
+int Benchmark::run_benchmarks() {
+  for (auto it = benchmarks_to_run.rbegin(), e = benchmarks_to_run.rend();
+       it != e; ++it)
+    (*it)->run();
+  return 0;
----------------
jhuber6 wrote:

So it does, want to make a patch to add the appropriate iterators?

https://github.com/llvm/llvm-project/pull/92009


More information about the libc-commits mailing list