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

via libc-commits libc-commits at lists.llvm.org
Mon May 13 11:49:51 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 53ff002c6f7ec64a75ab0990b1314cc6b4bb67cf 9273e50a8876b502475aea1547bd84d47c32b55e -- libc/benchmarks/gpu/BenchmarkLogger.cpp libc/benchmarks/gpu/BenchmarkLogger.h libc/benchmarks/gpu/LibcGpuBenchmark.cpp libc/benchmarks/gpu/LibcGpuBenchmark.h libc/benchmarks/gpu/LibcGpuBenchmarkMain.cpp libc/benchmarks/gpu/src/ctype/isalnum_benchmark.cpp libc/benchmarks/gpu/src/ctype/isalpha_benchmark.cpp libc/benchmarks/gpu/timing/nvptx/timing.h libc/benchmarks/gpu/timing/timing.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/benchmarks/gpu/BenchmarkLogger.cpp b/libc/benchmarks/gpu/BenchmarkLogger.cpp
index 94a0d897c9..4f70d23a1e 100644
--- a/libc/benchmarks/gpu/BenchmarkLogger.cpp
+++ b/libc/benchmarks/gpu/BenchmarkLogger.cpp
@@ -13,18 +13,21 @@ namespace libc_gpu_benchmarks {
 
 // cpp::string_view specialization
 template <>
-BenchmarkLogger &BenchmarkLogger::operator<< <cpp::string_view>(cpp::string_view str) {
+BenchmarkLogger &
+    BenchmarkLogger::operator<< <cpp::string_view>(cpp::string_view str) {
   LIBC_NAMESPACE::write_to_stderr(str);
   return *this;
 }
 
 // cpp::string specialization
-template <> BenchmarkLogger &BenchmarkLogger::operator<< <cpp::string>(cpp::string str) {
+template <>
+BenchmarkLogger &BenchmarkLogger::operator<< <cpp::string>(cpp::string str) {
   return *this << static_cast<cpp::string_view>(str);
 }
 
 // const char* specialization
-template <> BenchmarkLogger &BenchmarkLogger::operator<< <const char *>(const char *str) {
+template <>
+BenchmarkLogger &BenchmarkLogger::operator<< <const char *>(const char *str) {
   return *this << cpp::string_view(str);
 }
 
@@ -66,15 +69,20 @@ template BenchmarkLogger &BenchmarkLogger::operator<< <short>(short);
 template BenchmarkLogger &BenchmarkLogger::operator<< <int>(int);
 template BenchmarkLogger &BenchmarkLogger::operator<< <long>(long);
 template BenchmarkLogger &BenchmarkLogger::operator<< <long long>(long long);
-template BenchmarkLogger &BenchmarkLogger::operator<< <unsigned char>(unsigned char);
-template BenchmarkLogger &BenchmarkLogger::operator<< <unsigned short>(unsigned short);
-template BenchmarkLogger &BenchmarkLogger::operator<< <unsigned int>(unsigned int);
-template BenchmarkLogger &BenchmarkLogger::operator<< <unsigned long>(unsigned long);
+template BenchmarkLogger &
+    BenchmarkLogger::operator<< <unsigned char>(unsigned char);
+template BenchmarkLogger &
+    BenchmarkLogger::operator<< <unsigned short>(unsigned short);
+template BenchmarkLogger &
+    BenchmarkLogger::operator<< <unsigned int>(unsigned int);
+template BenchmarkLogger &
+    BenchmarkLogger::operator<< <unsigned long>(unsigned long);
 template BenchmarkLogger &
     BenchmarkLogger::operator<< <unsigned long long>(unsigned long long);
 
 #ifdef LIBC_TYPES_HAS_INT128
-template BenchmarkLogger &BenchmarkLogger::operator<< <__uint128_t>(__uint128_t);
+template BenchmarkLogger &
+    BenchmarkLogger::operator<< <__uint128_t>(__uint128_t);
 #endif // LIBC_TYPES_HAS_INT128
 template BenchmarkLogger &BenchmarkLogger::operator<< <UInt<128>>(UInt<128>);
 template BenchmarkLogger &BenchmarkLogger::operator<< <UInt<192>>(UInt<192>);
diff --git a/libc/benchmarks/gpu/timing/timing.h b/libc/benchmarks/gpu/timing/timing.h
index f37381fdf6..c47bb0d9eb 100644
--- a/libc/benchmarks/gpu/timing/timing.h
+++ b/libc/benchmarks/gpu/timing/timing.h
@@ -20,4 +20,3 @@
 #endif
 
 #endif // LLVM_LIBC_UTILS_GPU_TIMING_H
-

``````````

</details>


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


More information about the libc-commits mailing list