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