1#ifndef FREE_TENSOR_CONFIG_H
2#define FREE_TENSOR_CONFIG_H
21 static bool prettyPrint_;
22 static bool printAllId_;
23 static bool printSourceLocation_;
24 static bool fastMath_;
29 static bool debugRuntimeCheck_;
36 static std::vector<std::filesystem::path>
40 static std::vector<std::filesystem::path>
44 static std::vector<std::filesystem::path>
53 static std::vector<std::filesystem::path>
62 static std::vector<std::filesystem::path>
63 checkValidPaths(
const std::vector<std::filesystem::path> &paths,
64 bool required =
true);
80 printSourceLocation_ = flag;
84 static void setFastMath(
bool flag =
true) { fastMath_ = flag; }
87 static void setWerror(
bool flag =
true) { werror_ = flag; }
88 static bool werror() {
return werror_; }
94 debugRuntimeCheck_ = flag;
99 debugCUDAWithUM_ = flag;
110 backendCompilerCXX_ = checkValidPaths(paths);
113 return backendCompilerCXX_;
123 backendCompilerNVCC_ = checkValidPaths(paths);
126 return backendCompilerNVCC_;
137 backendOpenMP_ = path;
140 return backendOpenMP_;
144 defaultTarget_ = target;
149 defaultDevice_ = dev;
153 static void setRuntimeDir(
const std::vector<std::filesystem::path> &paths) {
154 runtimeDir_ = checkValidPaths(paths);
156 static const std::vector<std::filesystem::path> &
runtimeDir() {
static void setPrintAllId(bool flag=true)
Definition: config.h:76
static bool printSourceLocation()
Definition: config.h:82
static Ref< Target > defaultTarget()
Definition: config.h:146
static void setDefaultDevice(const Ref< Device > &dev)
Definition: config.h:148
static bool debugRuntimeCheck()
Definition: config.h:96
static bool debugCUDAWithUM()
Definition: config.h:101
static void init()
Definition: config.cc:106
static void setDefaultTarget(const Ref< Target > &target)
Definition: config.h:143
static void setPrettyPrint(bool pretty=true)
Definition: config.h:73
static bool printAllId()
Definition: config.h:77
static void setBackendCompilerNVCC(const std::vector< std::filesystem::path > &paths)
Set the NVCC compiler for GPU backend.
Definition: config.h:122
static void setBackendOpenMP(const std::vector< std::filesystem::path > &path)
Set the OpenMP library linked to the compiled executable.
Definition: config.h:136
static void setWerror(bool flag=true)
Definition: config.h:87
static void setDebugBinary(bool flag=true)
Definition: config.h:90
static const std::vector< std::filesystem::path > & backendCompilerCXX()
Definition: config.h:112
static bool withPyTorch()
Definition: config.cc:192
static void setDebugRuntimeCheck(bool flag=true)
Definition: config.h:93
static const std::vector< std::filesystem::path > & backendCompilerNVCC()
Definition: config.h:125
static const std::vector< std::filesystem::path > & runtimeDir()
Definition: config.h:156
static bool withCUDA()
Definition: config.cc:184
static const std::vector< std::filesystem::path > & backendOpenMP()
Definition: config.h:139
static bool withMKL()
Called in src/ffi/config.cc.
Definition: config.cc:176
static void setRuntimeDir(const std::vector< std::filesystem::path > &paths)
Definition: config.h:153
static bool werror()
Definition: config.h:88
static void setFastMath(bool flag=true)
Definition: config.h:84
static bool debugBinary()
Definition: config.h:91
static bool prettyPrint()
Definition: config.h:74
static void setPrintSourceLocation(bool flag=true)
Definition: config.h:79
static bool fastMath()
Definition: config.h:85
static void setBackendCompilerCXX(const std::vector< std::filesystem::path > &paths)
Set the C++ compiler for CPU backend.
Definition: config.h:109
static Ref< Device > defaultDevice()
Definition: config.h:151
static void setDebugCUDAWithUM(bool flag=true)
Definition: config.h:98
Definition: allocator.h:9