-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b44c8c
commit b84a312
Showing
16 changed files
with
227 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
|
||
#ifndef _MKN_GPU_DEFINES_HPP_ | ||
#define _MKN_GPU_DEFINES_HPP_ | ||
|
||
#include <type_traits> | ||
|
||
#if !defined(MKN_GPU_FN_PER_NS) | ||
#define MKN_GPU_FN_PER_NS 0 | ||
#endif | ||
|
||
#if !defined(MKN_GPU_ROCM) and __has_include("hip/hip_runtime.h") | ||
#define MKN_GPU_ROCM 1 | ||
#endif | ||
#if !defined(MKN_GPU_ROCM) | ||
#define MKN_GPU_ROCM 0 | ||
#endif | ||
|
||
#if !defined(MKN_GPU_CUDA) and __has_include(<cuda_runtime.h>) | ||
#define MKN_GPU_CUDA 1 | ||
#endif | ||
#if !defined(MKN_GPU_CUDA) | ||
#define MKN_GPU_CUDA 0 | ||
#endif | ||
|
||
#if MKN_GPU_CUDA == 1 && MKN_GPU_ROCM == 1 && MKN_GPU_FN_PER_NS == 0 | ||
#define MKN_GPU_FN_PER_NS 1 | ||
#endif | ||
|
||
#if MKN_GPU_ROCM == 1 | ||
#include "mkn/gpu/rocm.hpp" | ||
#endif | ||
|
||
#if MKN_GPU_CUDA | ||
#include "mkn/gpu/cuda.hpp" | ||
#endif | ||
|
||
#if MKN_GPU_FN_PER_NS == 1 || MKN_GPU_CPU == 1 | ||
#include "mkn/gpu/cpu.hpp" | ||
#endif | ||
|
||
namespace mkn::gpu { | ||
|
||
struct CompileFlags { | ||
bool constexpr static withCUDA = MKN_GPU_CUDA; | ||
bool constexpr static withROCM = MKN_GPU_ROCM; | ||
bool constexpr static perNamespace = MKN_GPU_FN_PER_NS; | ||
}; | ||
|
||
} /* namespace mkn::gpu */ | ||
|
||
#endif /*_MKN_GPU_DEFINES_HPP_*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.