1 //===-- Generic utilities for GPU timing ----------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "time_utils.h" 10 11 namespace LIBC_NAMESPACE { 12 13 #if defined(LIBC_TARGET_ARCH_IS_AMDGPU) 14 // This is expected to be initialized by the runtime if the default value is 15 // insufficient. 16 // TODO: Once we have another use-case for this we should put it in a common 17 // device environment struct. 18 gpu::Constant<uint64_t> __llvm_libc_clock_freq = clock_freq; 19 #endif 20 21 } // namespace LIBC_NAMESPACE 22