[libc-commits] [libc] [libc] Add Kernel Resource Usage to nvptx-loader (PR #97503)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Sun Jul 14 16:06:36 PDT 2024


================
@@ -15,13 +15,30 @@ function(add_benchmark benchmark_name)
   endif()
   add_libc_hermetic(
     ${benchmark_name}
-    IS_BENCHMARK
+    IS_GPU_BENCHMARK
     LINK_LIBRARIES
       LibcGpuBenchmark.hermetic
       ${BENCHMARK_LINK_LIBRARIES}
     ${BENCHMARK_UNPARSED_ARGUMENTS}
   )
   get_fq_target_name(${benchmark_name} fq_target_name)
+  set(fq_build_target_name ${fq_target_name}.__build__)
+
+  # We want to dump kernel resource usage for GPU benchmarks
+  get_target_property(gpu_loader_exe libc.utils.gpu.loader "EXECUTABLE")
+  set(res_usage_cmd $<$<BOOL:${LIBC_TARGET_OS_IS_GPU}>:${gpu_loader_exe}>
+    ${CMAKE_CROSSCOMPILING_EMULATOR}
----------------
jhuber6 wrote:

What's this do here? I was actually looking into working with this at some point, since it will allow me to test the other targets in the future.

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


More information about the libc-commits mailing list