Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Loading...
Searching...
No Matches
CompilerInterfaceDevice.h
Go to the documentation of this file.
1//===-- CompilerInterfaceDevice.h -- JIT entry point for GPU header --===//
2//
3// Part of the Proteus Project, under the Apache License v2.0 with LLVM
4// Exceptions. See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9//===----------------------------------------------------------------------===//
10
11#ifndef PROTEUS_COMPILERINTERFACEDEVICE_H
12#define PROTEUS_COMPILERINTERFACEDEVICE_H
13
14#if PROTEUS_ENABLE_CUDA
15
17using JitDeviceImplT = proteus::JitEngineDeviceCUDA;
18
19#elif PROTEUS_ENABLE_HIP
20
22using JitDeviceImplT = proteus::JitEngineDeviceHIP;
23
24#else
25#error \
26 "CompilerInterfaceDevice requires PROTEUS_ENABLE_CUDA or PROTEUS_ENABLE_HIP"
27#endif
28
29// The ABI of __jit_launch_kernel mirrors device-specific launchKernel and
30// depends on the host arch: https://github.com/Olympus-HPC/proteus/issues/47.
32__jit_launch_kernel(void *Kernel, dim3 GridDim, dim3 BlockDim,
33 void **KernelArgs, uint64_t ShmemSize, void *Stream);
34
35#endif
void * Kernel
Definition CompilerInterfaceDevice.cpp:50
proteus::DeviceTraits< JitDeviceImplT >::DeviceError_t __jit_launch_kernel(void *Kernel, dim3 GridDim, dim3 BlockDim, void **KernelArgs, uint64_t ShmemSize, void *Stream)
Definition CompilerInterfaceDevice.cpp:57
Definition JitEngineDeviceCUDA.hpp:31
Definition JitEngineDeviceHIP.hpp:28
Definition JitEngineDevice.hpp:174