Halide 22.0.0 Halide compiler and libraries

Target.h
Go to the documentation of this file.
1#ifndef HALIDE_TARGET_H
2#define HALIDE_TARGET_H
3
4/** \file
5 * Defines the structure that describes a Halide target.
6 */
7
8#include <bitset>
9#include <cstdint>
10#include <string>
11
12#include "DeviceAPI.h"
13#include "Type.h"
14#include "runtime/HalideRuntime.h"
15
16 namespace Halide {
17
18/** A struct representing a target machine and os to generate code for. */
19 struct Target {
20 /** The operating system used by the target. Determines which
21 * system calls to generate.
22 * Corresponds to os_name_map in Target.cpp. */
23 enum OS {
24 OSUnknown = 0,
25 Linux,
26 Windows,
27 OSX,
28 Android,
29 IOS,
30 QuRT,
31 NoOS,
32 Fuchsia,
33 WebAssemblyRuntime
34 } os = OSUnknown;
35
36 /** The architecture used by the target. Determines the
37 * instruction set to use.
38 * Corresponds to arch_name_map in Target.cpp. */
39 enum Arch {
40 ArchUnknown = 0,
41 X86,
42 ARM,
43 Hexagon,
44 POWERPC,
45 WebAssembly,
46 RISCV
47 } arch = ArchUnknown;
48
49 /** The bit-width of the target machine. Must be 0 for unknown, or 32 or 64. */
50 int bits = 0;
51
52 /** The bit-width of a vector register for targets where this is configurable and
53 * targeting a fixed size is desired. The default of 0 indicates no assumption of
54 * fixed size is allowed. */
55 int vector_bits = 0;
56
57 /** The specific processor to be targeted, tuned for.
58 * Corresponds to processor_name_map in Target.cpp.
59 *
60 * New entries should be added to the end. */
61 enum Processor {
62 /// Do not tune for any specific CPU. In practice, this means that halide will decide the tune CPU based on the enabled features.
63 ProcessorGeneric = 0,
64 K8, /// Tune for AMD K8 Hammer CPU (AMD Family 0Fh, launched 2003).
65 K8_SSE3, /// Tune for later versions of AMD K8 CPU, with SSE3 support.
66 AMDFam10, /// Tune for AMD K10 "Barcelona" CPU (AMD Family 10h, launched 2007).
67 BtVer1, /// Tune for AMD Bobcat CPU (AMD Family 14h, launched 2011).
68 BdVer1, /// Tune for AMD Bulldozer CPU (AMD Family 15h, launched 2011).
69 BdVer2, /// Tune for AMD Piledriver CPU (AMD Family 15h (2nd-gen), launched 2012).
70 BdVer3, /// Tune for AMD Steamroller CPU (AMD Family 15h (3nd-gen), launched 2014).
71 BdVer4, /// Tune for AMD Excavator CPU (AMD Family 15h (4th-gen), launched 2015).
72 BtVer2, /// Tune for AMD Jaguar CPU (AMD Family 16h, launched 2013).
73 ZnVer1, /// Tune for AMD Zen CPU (AMD Family 17h, launched 2017).
74 ZnVer2, /// Tune for AMD Zen 2 CPU (AMD Family 17h, launched 2019).
75 ZnVer3, /// Tune for AMD Zen 3 CPU (AMD Family 19h, launched 2020).
76 ZnVer4, /// Tune for AMD Zen 4 CPU (AMD Family 19h, launched 2022).
77 ZnVer5, /// Tune for AMD Zen 5 CPU (AMD Family 1Ah, launched 2024).
78 } processor_tune = ProcessorGeneric;
79
80 /** Optional features a target can have.
81 * Corresponds to feature_name_map in Target.cpp.
82 * See definitions in HalideRuntime.h for full information.
83 */
84 enum Feature {
85 JIT = halide_target_feature_jit,
86 Debug = halide_target_feature_debug,
87 EnableBacktraces = halide_target_feature_enable_backtraces,
88 NoAsserts = halide_target_feature_no_asserts,
89 NoBoundsQuery = halide_target_feature_no_bounds_query,
90 SSE41 = halide_target_feature_sse41,
91 AVX = halide_target_feature_avx,
92 AVX2 = halide_target_feature_avx2,
93 AVXVNNI = halide_target_feature_avxvnni,
94 FMA = halide_target_feature_fma,
95 FMA4 = halide_target_feature_fma4,
96 F16C = halide_target_feature_f16c,
97 ARMv7s = halide_target_feature_armv7s,
98 NoNEON = halide_target_feature_no_neon,
99 VSX = halide_target_feature_vsx,
100 POWER_ARCH_2_07 = halide_target_feature_power_arch_2_07,
101 CUDA = halide_target_feature_cuda,
102 CUDACapability30 = halide_target_feature_cuda_capability30,
103 CUDACapability32 = halide_target_feature_cuda_capability32,
104 CUDACapability35 = halide_target_feature_cuda_capability35,
105 CUDACapability50 = halide_target_feature_cuda_capability50,
106 CUDACapability61 = halide_target_feature_cuda_capability61,
107 CUDACapability70 = halide_target_feature_cuda_capability70,
108 CUDACapability75 = halide_target_feature_cuda_capability75,
109 CUDACapability80 = halide_target_feature_cuda_capability80,
110 CUDACapability86 = halide_target_feature_cuda_capability86,
111 OpenCL = halide_target_feature_opencl,
112 CLDoubles = halide_target_feature_cl_doubles,
113 CLHalf = halide_target_feature_cl_half,
114 CLAtomics64 = halide_target_feature_cl_atomic64,
115 EGL = halide_target_feature_egl,
116 UserContext = halide_target_feature_user_context,
117 Profile = halide_target_feature_profile,
118 NoRuntime = halide_target_feature_no_runtime,
119 Metal = halide_target_feature_metal,
120 CPlusPlusMangling = halide_target_feature_c_plus_plus_mangling,
121 LargeBuffers = halide_target_feature_large_buffers,
122 HexagonDma = halide_target_feature_hexagon_dma,
123 HVX_128 = halide_target_feature_hvx_128,
124 HVX = HVX_128,
125 HVX_v62 = halide_target_feature_hvx_v62,
126 HVX_v65 = halide_target_feature_hvx_v65,
127 HVX_v66 = halide_target_feature_hvx_v66,
128 HVX_v68 = halide_target_feature_hvx_v68,
129 FuzzFloatStores = halide_target_feature_fuzz_float_stores,
130 SoftFloatABI = halide_target_feature_soft_float_abi,
131 MSAN = halide_target_feature_msan,
132 AVX512 = halide_target_feature_avx512,
133 AVX512_KNL = halide_target_feature_avx512_knl,
134 AVX512_Skylake = halide_target_feature_avx512_skylake,
135 AVX512_Cannonlake = halide_target_feature_avx512_cannonlake,
136 AVX512_SapphireRapids = halide_target_feature_avx512_sapphirerapids,
137 AVX512_Zen4 = halide_target_feature_avx512_zen4,
138 AVX512_Zen5 = halide_target_feature_avx512_zen5,
139 TraceLoads = halide_target_feature_trace_loads,
140 TraceStores = halide_target_feature_trace_stores,
141 TraceRealizations = halide_target_feature_trace_realizations,
142 TracePipeline = halide_target_feature_trace_pipeline,
143 D3D12Compute = halide_target_feature_d3d12compute,
144 StrictFloat = halide_target_feature_strict_float,
145 TSAN = halide_target_feature_tsan,
146 ASAN = halide_target_feature_asan,
147 CheckUnsafePromises = halide_target_feature_check_unsafe_promises,
148 EmbedBitcode = halide_target_feature_embed_bitcode,
149 EnableLLVMLoopOpt = halide_target_feature_enable_llvm_loop_opt,
150 WasmMvpOnly = halide_target_feature_wasm_mvponly,
151 WasmSimd128 = halide_target_feature_wasm_simd128,
152 WasmThreads = halide_target_feature_wasm_threads,
153 WasmBulkMemory = halide_target_feature_wasm_bulk_memory,
154 WebGPU = halide_target_feature_webgpu,
155 SVE = halide_target_feature_sve,
156 SVE2 = halide_target_feature_sve2,
157 ARMDotProd = halide_target_feature_arm_dot_prod,
158 ARMFp16 = halide_target_feature_arm_fp16,
159 LLVMLargeCodeModel = halide_llvm_large_code_model,
160 RVV = halide_target_feature_rvv,
161 ARMv8a = halide_target_feature_armv8a,
162 ARMv81a = halide_target_feature_armv81a,
163 ARMv82a = halide_target_feature_armv82a,
164 ARMv83a = halide_target_feature_armv83a,
165 ARMv84a = halide_target_feature_armv84a,
166 ARMv85a = halide_target_feature_armv85a,
167 ARMv86a = halide_target_feature_armv86a,
168 ARMv87a = halide_target_feature_armv87a,
169 ARMv88a = halide_target_feature_armv88a,
170 ARMv89a = halide_target_feature_armv89a,
171 SanitizerCoverage = halide_target_feature_sanitizer_coverage,
172 ProfileByTimer = halide_target_feature_profile_by_timer,
173 SPIRV = halide_target_feature_spirv,
174 Vulkan = halide_target_feature_vulkan,
175 VulkanInt8 = halide_target_feature_vulkan_int8,
176 VulkanInt16 = halide_target_feature_vulkan_int16,
177 VulkanInt64 = halide_target_feature_vulkan_int64,
178 VulkanFloat16 = halide_target_feature_vulkan_float16,
179 VulkanFloat64 = halide_target_feature_vulkan_float64,
180 VulkanV10 = halide_target_feature_vulkan_version10,
181 VulkanV12 = halide_target_feature_vulkan_version12,
182 VulkanV13 = halide_target_feature_vulkan_version13,
183 Semihosting = halide_target_feature_semihosting,
184 AVX10_1 = halide_target_feature_avx10_1,
185 X86APX = halide_target_feature_x86_apx,
186 Simulator = halide_target_feature_simulator,
187 FeatureEnd = halide_target_feature_end
188 };
189 Target() = default;
190 Target(OS o, Arch a, int b, Processor pt, const std::vector<Feature> &initial_features = std::vector<Feature>(),
191 int vb = 0)
192 : os(o), arch(a), bits(b), vector_bits(vb), processor_tune(pt) {
193 for (const auto &f : initial_features) {
194 set_feature(f);
195 }
196 validate_features();
197 }
198
199 Target(OS o, Arch a, int b, const std::vector<Feature> &initial_features = std::vector<Feature>())
200 : Target(o, a, b, ProcessorGeneric, initial_features) {
201 }
202
203 /** Given a string of the form used in HL_TARGET
204 * (e.g. "x86-64-avx"), construct the Target it specifies. Note
205 * that this always starts with the result of get_host_target(),
206 * replacing only the parts found in the target string, so if you
207 * omit (say) an OS specification, the host OS will be used
208 * instead. An empty string is exactly equivalent to
209 * get_host_target().
210 *
211 * Invalid target strings will fail with a user_error.
212 */
213 // @{
214 explicit Target(const std::string &s);
215 explicit Target(const char *s);
216 // @}
217
218 /** Check if a target string is valid. */
219 static bool validate_target_string(const std::string &s);
220
221 /** Return true if any of the arch/bits/os fields are "unknown"/0;
222 return false otherwise. */
223 bool has_unknowns() const;
224
225 void set_feature(Feature f, bool value = true);
226
227 void set_features(const std::vector<Feature> &features_to_set, bool value = true);
228
229 bool has_feature(Feature f) const;
230
231 bool has_feature(halide_target_feature_t f) const {
232 return has_feature((Feature)f);
233 }
234
235 bool features_any_of(const std::vector<Feature> &test_features) const;
236
237 bool features_all_of(const std::vector<Feature> &test_features) const;
238
239 /** Return a copy of the target with the given feature set.
240 * This is convenient when enabling certain features (e.g. NoBoundsQuery)
241 * in an initialization list, where the target to be mutated may be
242 * a const reference. */
243 Target with_feature(Feature f) const;
244
245 /** Return a copy of the target with the given feature cleared.
246 * This is convenient when disabling certain features (e.g. NoBoundsQuery)
247 * in an initialization list, where the target to be mutated may be
248 * a const reference. */
249 Target without_feature(Feature f) const;
250
251 /** Is a fully feature GPU compute runtime enabled? I.e. is
252 * Func::gpu_tile and similar going to work? Currently includes
253 * CUDA, OpenCL, Metal and D3D12Compute. */
254 bool has_gpu_feature() const;
255
256 /** Does this target allow using a certain type. Generally all
257 * types except 64-bit float and int/uint should be supported by
258 * all backends.
259 *
260 * It is likely better to call the version below which takes a DeviceAPI.
261 */
262 bool supports_type(const Type &t) const;
263
264 /** Does this target allow using a certain type on a certain device.
265 * This is the prefered version of this routine.
266 */
267 bool supports_type(const Type &t, DeviceAPI device) const;
268
269 /** Returns whether a particular device API can be used with this
270 * Target. */
271 bool supports_device_api(DeviceAPI api) const;
272
273 /** If this Target (including all Features) requires a specific DeviceAPI,
274 * return it. If it doesn't, return DeviceAPI::None. If the Target has
275 * features with multiple (different) DeviceAPI requirements, the result
276 * will be an arbitrary DeviceAPI. */
277 DeviceAPI get_required_device_api() const;
278
279 bool operator==(const Target &other) const {
280 return os == other.os &&
281 arch == other.arch &&
282 bits == other.bits &&
283 processor_tune == other.processor_tune &&
284 features == other.features;
285 }
286
287 bool operator!=(const Target &other) const {
288 return !(*this == other);
289 }
290
291 /**
292 * Create a "greatest common denominator" runtime target that is compatible with
293 * both this target and \p other. Used by generators to conveniently select a suitable
294 * runtime when linking together multiple functions.
295 *
296 * @param other The other target from which we compute the gcd target.
297 * @param[out] result The gcd target if we return true, otherwise unmodified. Can be the same as *this.
298 * @return Whether it was possible to find a compatible target (true) or not.
299 */
300 bool get_runtime_compatible_target(const Target &other, Target &result);
301
302 /** Convert the Target into a string form that can be reconstituted
303 * by merge_string(), which will always be of the form
304 *
305 * arch-bits-os-processor-feature1-feature2...featureN.
306 *
307 * Note that is guaranteed that Target(t1.to_string()) == t1,
308 * but not that Target(s).to_string() == s (since there can be
309 * multiple strings that parse to the same Target)...
310 * *unless* t1 contains 'unknown' fields (in which case you'll get a string
311 * that can't be parsed, which is intentional).
312 */
313 std::string to_string() const;
314
315 /** Given a data type, return an estimate of the "natural" vector size
316 * for that data type when compiling for this Target. */
317 int natural_vector_size(const Halide::Type &t) const;
318
319 /** Given a data type, return an estimate of the "natural" vector size
320 * for that data type when compiling for this Target. */
321 template<typename data_t>
322 int natural_vector_size() const {
323 return natural_vector_size(type_of<data_t>());
324 }
325
326 /** Return true iff 64 bits and has_feature(LargeBuffers). */
327 bool has_large_buffers() const {
328 return bits == 64 && has_feature(LargeBuffers);
329 }
330
331 /** Return the maximum buffer size in bytes supported on this
332 * Target. This is 2^31 - 1 except on 64-bit targets when the LargeBuffers
333 * feature is enabled, which expands the maximum to 2^63 - 1. */
334 int64_t maximum_buffer_size() const {
335 if (has_large_buffers()) {
336 return (((uint64_t)1) << 63) - 1;
337 } else {
338 return (((uint64_t)1) << 31) - 1;
339 }
340 }
341
342 /** Get the minimum cuda capability found as an integer. Returns
343 * 20 (our minimum supported cuda compute capability) if no cuda
344 * features are set. */
345 int get_cuda_capability_lower_bound() const;
346
347 /** Get the minimum Vulkan capability found as an integer. Returns
348 * 10 (our minimum supported Vulkan compute capability) if no Vulkan
349 * features are set. */
350 int get_vulkan_capability_lower_bound() const;
351
352 /** Get the minimum ARM v8.x capability found as an integer. Returns
353 * -1 if no ARM v8.x features are set. */
354 int get_arm_v8_lower_bound() const;
355
356 /** Was libHalide compiled with support for this target? */
357 bool supported() const;
358
359 /** Return a bitset of the Featuress set in this Target (set = 1).
360 * Note that while this happens to be the current internal representation,
361 * that might not always be the case. */
362 const std::bitset<FeatureEnd> &get_features_bitset() const {
363 return features;
364 }
365
366 /** Return the name corresponding to a given Feature, in the form
367 * used to construct Target strings (e.g., Feature::Debug is "debug" and not "Debug"). */
368 static std::string feature_to_name(Target::Feature feature);
369
370 /** Return the feature corresponding to a given name, in the form
371 * used to construct Target strings (e.g., Feature::Debug is "debug" and not "Debug").
372 * If the string is not a known feature name, return FeatureEnd. */
373 static Target::Feature feature_from_name(const std::string &name);
374
375 private:
376 /** A bitmask that stores the active features. */
377 std::bitset<FeatureEnd> features;
378
379 /** Attempt to validate that all features set are sensible for the base Target.
380 * This is *not* guaranteed to get all invalid combinations, but is intended
381 * to catch at least the most common (e.g., setting arm-specific features on x86). */
382 void validate_features() const;
383};
384
385/** Return the target corresponding to the host machine. */
386 Target get_host_target();
387
388/** Return the target that Halide will use. If HL_TARGET is set it
389 * uses that. Otherwise calls \ref get_host_target */
390 Target get_target_from_environment();
391
392/** Return the target that Halide will use for jit-compilation. If
393 * HL_JIT_TARGET is set it uses that. Otherwise calls \ref
394 * get_host_target. Throws an error if the architecture, bit width,
395 * and OS of the target do not match the host target, so this is only
396 * useful for controlling the feature set. */
397 Target get_jit_target_from_environment();
398
399/** Get the Target feature corresponding to a DeviceAPI. For device
400 * apis that do not correspond to any single target feature, returns
401 * Target::FeatureEnd */
402 Target::Feature target_feature_for_device_api(DeviceAPI api);
403
404 namespace Internal {
405
406 void target_test();
407}
408
409} // namespace Halide
410
411#endif
DeviceAPI.h
Defines DeviceAPI.
HalideRuntime.h
This file declares the routines used by Halide internally in its runtime.
halide_target_feature_t
halide_target_feature_t
Optional features a compilation Target can have.
Definition: HalideRuntime.h:1361
halide_target_feature_large_buffers
@ halide_target_feature_large_buffers
Enable 64-bit buffer indexing to support buffers > 2GB. Ignored if bits != 64.
Definition: HalideRuntime.h:1406
halide_target_feature_fma
@ halide_target_feature_fma
Enable x86 FMA instruction.
Definition: HalideRuntime.h:1372
halide_target_feature_wasm_bulk_memory
@ halide_target_feature_wasm_bulk_memory
Enable +bulk-memory instructions for WebAssembly codegen.
Definition: HalideRuntime.h:1439
halide_target_feature_tsan
@ halide_target_feature_tsan
Enable hooks for TSAN support.
Definition: HalideRuntime.h:1429
halide_target_feature_msan
@ halide_target_feature_msan
Enable hooks for MSAN support.
Definition: HalideRuntime.h:1412
halide_target_feature_avx512_zen4
@ halide_target_feature_avx512_zen4
Enable the AVX512 features supported by Zen4 processors. This include all of the Cannonlake features,...
Definition: HalideRuntime.h:1417
halide_target_feature_wasm_threads
@ halide_target_feature_wasm_threads
Enable use of threads in WebAssembly codegen. Requires the use of a wasm runtime that provides pthrea...
Definition: HalideRuntime.h:1438
halide_target_feature_trace_loads
@ halide_target_feature_trace_loads
Trace all loads done by the pipeline. Equivalent to calling Func::trace_loads on every non-inlined Fu...
Definition: HalideRuntime.h:1420
halide_target_feature_enable_llvm_loop_opt
@ halide_target_feature_enable_llvm_loop_opt
Enable loop vectorization + unrolling in LLVM. Overrides halide_target_feature_disable_llvm_loop_opt....
Definition: HalideRuntime.h:1435
halide_target_feature_no_asserts
@ halide_target_feature_no_asserts
Disable all runtime checks, for slightly tighter code.
Definition: HalideRuntime.h:1365
halide_target_feature_cl_doubles
@ halide_target_feature_cl_doubles
Enable double support on OpenCL targets.
Definition: HalideRuntime.h:1394
halide_target_feature_rvv
@ halide_target_feature_rvv
Enable RISCV "V" Vector Extension.
Definition: HalideRuntime.h:1447
halide_target_feature_avx2
@ halide_target_feature_avx2
Use AVX 2 instructions. Only relevant on x86.
Definition: HalideRuntime.h:1370
halide_target_feature_trace_realizations
@ halide_target_feature_trace_realizations
Trace all realizations done by the pipeline. Equivalent to calling Func::trace_realizations on every ...
Definition: HalideRuntime.h:1422
halide_target_feature_c_plus_plus_mangling
@ halide_target_feature_c_plus_plus_mangling
Generate C++ mangled names for result function, et al.
Definition: HalideRuntime.h:1404
halide_target_feature_vulkan_float16
@ halide_target_feature_vulkan_float16
Enable Vulkan 16-bit float support.
Definition: HalideRuntime.h:1465
halide_target_feature_avx512_zen5
@ halide_target_feature_avx512_zen5
Enable the AVX512 features supported by Zen5 processors. This include all of the Cannonlake features,...
Definition: HalideRuntime.h:1418
halide_target_feature_no_runtime
@ halide_target_feature_no_runtime
Do not include a copy of the Halide runtime in any generated object file or assembly.
Definition: HalideRuntime.h:1400
halide_target_feature_hvx_v65
@ halide_target_feature_hvx_v65
Enable Hexagon v65 architecture.
Definition: HalideRuntime.h:1424
halide_target_feature_debug
@ halide_target_feature_debug
Turn on debug info and output for runtime code.
Definition: HalideRuntime.h:1363
halide_target_feature_embed_bitcode
@ halide_target_feature_embed_bitcode
Emulate clang -fembed-bitcode flag.
Definition: HalideRuntime.h:1434
halide_target_feature_armv86a
@ halide_target_feature_armv86a
Enable ARMv8.6a instructions.
Definition: HalideRuntime.h:1454
halide_target_feature_wasm_simd128
@ halide_target_feature_wasm_simd128
Enable +simd128 instructions for WebAssembly codegen.
Definition: HalideRuntime.h:1437
halide_target_feature_vulkan
@ halide_target_feature_vulkan
Enable Vulkan runtime support.
Definition: HalideRuntime.h:1461
halide_target_feature_end
@ halide_target_feature_end
A sentinel. Every target is considered to have this feature, and setting this feature does nothing.
Definition: HalideRuntime.h:1474
halide_target_feature_simulator
@ halide_target_feature_simulator
Target is for a simulator environment. Currently only applies to iOS.
Definition: HalideRuntime.h:1473
halide_llvm_large_code_model
@ halide_llvm_large_code_model
Use the LLVM large code model to compile.
Definition: HalideRuntime.h:1446
halide_target_feature_profile_by_timer
@ halide_target_feature_profile_by_timer
Alternative to halide_target_feature_profile using timer interrupt for systems without threads or app...
Definition: HalideRuntime.h:1459
halide_target_feature_semihosting
@ halide_target_feature_semihosting
Used together with Target::NoOS for the baremetal target built with semihosting library and run with ...
Definition: HalideRuntime.h:1470
halide_target_feature_soft_float_abi
@ halide_target_feature_soft_float_abi
Enable soft float ABI. This only enables the soft float ABI calling convention, which does not necess...
Definition: HalideRuntime.h:1411
halide_target_feature_sve2
@ halide_target_feature_sve2
Enable ARM Scalable Vector Extensions v2.
Definition: HalideRuntime.h:1442
halide_target_feature_d3d12compute
@ halide_target_feature_d3d12compute
Enable Direct3D 12 Compute runtime.
Definition: HalideRuntime.h:1431
halide_target_feature_cuda_capability86
@ halide_target_feature_cuda_capability86
Enable CUDA compute capability 8.6 (Ampere)
Definition: HalideRuntime.h:1391
halide_target_feature_armv89a
@ halide_target_feature_armv89a
Enable ARMv8.9a instructions.
Definition: HalideRuntime.h:1457
halide_target_feature_avx512_skylake
@ halide_target_feature_avx512_skylake
Enable the AVX512 features supported by Skylake Xeon server processors. This adds AVX512-VL,...
Definition: HalideRuntime.h:1415
halide_target_feature_avx512_cannonlake
@ halide_target_feature_avx512_cannonlake
Enable the AVX512 features expected to be supported by future Cannonlake processors....
Definition: HalideRuntime.h:1416
halide_target_feature_metal
@ halide_target_feature_metal
Enable the (Apple) Metal runtime.
Definition: HalideRuntime.h:1402
halide_target_feature_hvx_128
@ halide_target_feature_hvx_128
Enable HVX 128 byte mode.
Definition: HalideRuntime.h:1408
halide_target_feature_cuda_capability70
@ halide_target_feature_cuda_capability70
Enable CUDA compute capability 7.0 (Volta)
Definition: HalideRuntime.h:1388
halide_target_feature_fma4
@ halide_target_feature_fma4
Enable x86 (AMD) FMA4 instruction set.
Definition: HalideRuntime.h:1373
halide_target_feature_cuda_capability30
@ halide_target_feature_cuda_capability30
Enable CUDA compute capability 3.0 (Kepler)
Definition: HalideRuntime.h:1383
halide_target_feature_no_neon
@ halide_target_feature_no_neon
Avoid using NEON instructions. Only relevant for 32-bit ARM.
Definition: HalideRuntime.h:1377
halide_target_feature_cuda_capability61
@ halide_target_feature_cuda_capability61
Enable CUDA compute capability 6.1 (Pascal)
Definition: HalideRuntime.h:1387
halide_target_feature_armv7s
@ halide_target_feature_armv7s
Generate code for ARMv7s. Only relevant for 32-bit ARM.
Definition: HalideRuntime.h:1376
halide_target_feature_spirv
@ halide_target_feature_spirv
Enable SPIR-V code generation support.
Definition: HalideRuntime.h:1460
halide_target_feature_trace_pipeline
@ halide_target_feature_trace_pipeline
Trace the pipeline.
Definition: HalideRuntime.h:1423
halide_target_feature_armv88a
@ halide_target_feature_armv88a
Enable ARMv8.8a instructions.
Definition: HalideRuntime.h:1456
halide_target_feature_cl_atomic64
@ halide_target_feature_cl_atomic64
Enable 64-bit atomics operations on OpenCL targets.
Definition: HalideRuntime.h:1395
halide_target_feature_egl
@ halide_target_feature_egl
Force use of EGL support.
Definition: HalideRuntime.h:1443
halide_target_feature_hvx_v68
@ halide_target_feature_hvx_v68
Enable Hexagon v68 architecture.
Definition: HalideRuntime.h:1426
halide_target_feature_avx10_1
@ halide_target_feature_avx10_1
Intel AVX10 version 1 support. vector_bits is used to indicate width.
Definition: HalideRuntime.h:1471
halide_target_feature_avxvnni
@ halide_target_feature_avxvnni
Enable the AVX-VNNI features supported by AVX2 instructions. Supports 256-bit VNNI instructions witho...
Definition: HalideRuntime.h:1371
halide_target_feature_profile
@ halide_target_feature_profile
Launch a sampling profiler alongside the Halide pipeline that monitors and reports the runtime used b...
Definition: HalideRuntime.h:1399
halide_target_feature_strict_float
@ halide_target_feature_strict_float
Turn off all non-IEEE floating-point optimization. Currently applies only to LLVM targets.
Definition: HalideRuntime.h:1428
halide_target_feature_cuda_capability35
@ halide_target_feature_cuda_capability35
Enable CUDA compute capability 3.5 (Kepler)
Definition: HalideRuntime.h:1385
halide_target_feature_armv8a
@ halide_target_feature_armv8a
Enable ARMv8a instructions.
Definition: HalideRuntime.h:1448
halide_target_feature_asan
@ halide_target_feature_asan
Enable hooks for ASAN support.
Definition: HalideRuntime.h:1430
halide_target_feature_armv87a
@ halide_target_feature_armv87a
Enable ARMv8.7a instructions.
Definition: HalideRuntime.h:1455
halide_target_feature_cl_half
@ halide_target_feature_cl_half
Enable half support on OpenCL targets.
Definition: HalideRuntime.h:1427
halide_target_feature_vulkan_float64
@ halide_target_feature_vulkan_float64
Enable Vulkan 64-bit float support.
Definition: HalideRuntime.h:1466
halide_target_feature_arm_dot_prod
@ halide_target_feature_arm_dot_prod
Enable ARMv8.2-a dotprod extension (i.e. udot and sdot instructions)
Definition: HalideRuntime.h:1444
halide_target_feature_avx512_sapphirerapids
@ halide_target_feature_avx512_sapphirerapids
Enable the AVX512 features supported by Sapphire Rapids processors. This include all of the Zen4 feat...
Definition: HalideRuntime.h:1419
halide_target_feature_vulkan_version13
@ halide_target_feature_vulkan_version13
Enable Vulkan v1.3 runtime target support.
Definition: HalideRuntime.h:1469
halide_target_feature_vulkan_version12
@ halide_target_feature_vulkan_version12
Enable Vulkan v1.2 runtime target support.
Definition: HalideRuntime.h:1468
halide_target_feature_sse41
@ halide_target_feature_sse41
Use SSE 4.1 and earlier instructions. Only relevant on x86.
Definition: HalideRuntime.h:1368
halide_target_feature_power_arch_2_07
@ halide_target_feature_power_arch_2_07
Use POWER ISA 2.07 new instructions. Only relevant on POWERPC.
Definition: HalideRuntime.h:1380
halide_target_feature_opencl
@ halide_target_feature_opencl
Enable the OpenCL runtime.
Definition: HalideRuntime.h:1393
halide_target_feature_trace_stores
@ halide_target_feature_trace_stores
Trace all stores done by the pipeline. Equivalent to calling Func::trace_stores on every non-inlined ...
Definition: HalideRuntime.h:1421
halide_target_feature_hexagon_dma
@ halide_target_feature_hexagon_dma
Enable Hexagon DMA buffers.
Definition: HalideRuntime.h:1433
halide_target_feature_avx512
@ halide_target_feature_avx512
Enable the base AVX512 subset supported by all AVX512 architectures. The specific feature sets are AV...
Definition: HalideRuntime.h:1413
halide_target_feature_avx512_knl
@ halide_target_feature_avx512_knl
Enable the AVX512 features supported by Knight's Landing chips, such as the Xeon Phi x200....
Definition: HalideRuntime.h:1414
halide_target_feature_cuda_capability50
@ halide_target_feature_cuda_capability50
Enable CUDA compute capability 5.0 (Maxwell)
Definition: HalideRuntime.h:1386
halide_target_feature_arm_fp16
@ halide_target_feature_arm_fp16
Enable ARMv8.2-a half-precision floating point data processing.
Definition: HalideRuntime.h:1445
halide_target_feature_armv82a
@ halide_target_feature_armv82a
Enable ARMv8.2a instructions.
Definition: HalideRuntime.h:1450
halide_target_feature_hvx_v62
@ halide_target_feature_hvx_v62
Enable Hexagon v62 architecture.
Definition: HalideRuntime.h:1409
halide_target_feature_armv84a
@ halide_target_feature_armv84a
Enable ARMv8.4a instructions.
Definition: HalideRuntime.h:1452
halide_target_feature_cuda
@ halide_target_feature_cuda
Enable the CUDA runtime. Defaults to compute capability 2.0 (Fermi)
Definition: HalideRuntime.h:1382
halide_target_feature_armv81a
@ halide_target_feature_armv81a
Enable ARMv8.1a instructions.
Definition: HalideRuntime.h:1449
halide_target_feature_webgpu
@ halide_target_feature_webgpu
Enable the WebGPU runtime.
Definition: HalideRuntime.h:1440
halide_target_feature_sanitizer_coverage
@ halide_target_feature_sanitizer_coverage
Enable hooks for SanitizerCoverage support.
Definition: HalideRuntime.h:1458
halide_target_feature_cuda_capability80
@ halide_target_feature_cuda_capability80
Enable CUDA compute capability 8.0 (Ampere)
Definition: HalideRuntime.h:1390
halide_target_feature_wasm_mvponly
@ halide_target_feature_wasm_mvponly
Disable all extensions to WebAssembly codegen (including +sign-ext and +nontrapping-fptoint,...
Definition: HalideRuntime.h:1436
halide_target_feature_f16c
@ halide_target_feature_f16c
Enable x86 16-bit float support.
Definition: HalideRuntime.h:1374
halide_target_feature_vulkan_int16
@ halide_target_feature_vulkan_int16
Enable Vulkan 16-bit integer support.
Definition: HalideRuntime.h:1463
halide_target_feature_enable_backtraces
@ halide_target_feature_enable_backtraces
Preserve frame pointers and include unwind tables to support accurate backtraces for debugging and pr...
Definition: HalideRuntime.h:1364
halide_target_feature_cuda_capability32
@ halide_target_feature_cuda_capability32
Enable CUDA compute capability 3.2 (Tegra K1)
Definition: HalideRuntime.h:1384
halide_target_feature_armv85a
@ halide_target_feature_armv85a
Enable ARMv8.5a instructions.
Definition: HalideRuntime.h:1453
halide_target_feature_jit
@ halide_target_feature_jit
Generate code that will run immediately inside the calling process.
Definition: HalideRuntime.h:1362
halide_target_feature_avx
@ halide_target_feature_avx
Use AVX 1 instructions. Only relevant on x86.
Definition: HalideRuntime.h:1369
halide_target_feature_cuda_capability75
@ halide_target_feature_cuda_capability75
Enable CUDA compute capability 7.5 (Turing)
Definition: HalideRuntime.h:1389
halide_target_feature_check_unsafe_promises
@ halide_target_feature_check_unsafe_promises
Insert assertions for promises.
Definition: HalideRuntime.h:1432
halide_target_feature_vsx
@ halide_target_feature_vsx
Use VSX instructions. Only relevant on POWERPC.
Definition: HalideRuntime.h:1379
halide_target_feature_vulkan_int8
@ halide_target_feature_vulkan_int8
Enable Vulkan 8-bit integer support.
Definition: HalideRuntime.h:1462
halide_target_feature_armv83a
@ halide_target_feature_armv83a
Enable ARMv8.3a instructions.
Definition: HalideRuntime.h:1451
halide_target_feature_vulkan_int64
@ halide_target_feature_vulkan_int64
Enable Vulkan 64-bit integer support.
Definition: HalideRuntime.h:1464
halide_target_feature_user_context
@ halide_target_feature_user_context
Generated code takes a user_context pointer as first argument.
Definition: HalideRuntime.h:1397
halide_target_feature_no_bounds_query
@ halide_target_feature_no_bounds_query
Disable the bounds querying functionality.
Definition: HalideRuntime.h:1366
halide_target_feature_vulkan_version10
@ halide_target_feature_vulkan_version10
Enable Vulkan v1.0 runtime target support.
Definition: HalideRuntime.h:1467
halide_target_feature_fuzz_float_stores
@ halide_target_feature_fuzz_float_stores
On every floating point store, set the last bit of the mantissa to zero. Pipelines for which the outp...
Definition: HalideRuntime.h:1410
halide_target_feature_sve
@ halide_target_feature_sve
Enable ARM Scalable Vector Extensions.
Definition: HalideRuntime.h:1441
halide_target_feature_x86_apx
@ halide_target_feature_x86_apx
Intel x86 APX support. Covers initial set of features released as APX: egpr,push2pop2,...
Definition: HalideRuntime.h:1472
halide_target_feature_hvx_v66
@ halide_target_feature_hvx_v66
Enable Hexagon v66 architecture.
Definition: HalideRuntime.h:1425
Type.h
Defines halide types.
Halide::Internal::target_test
void target_test()
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AbstractGenerator.h:19
Halide::get_host_target
Target get_host_target()
Return the target corresponding to the host machine.
Halide::LinkageType::Internal
@ Internal
Not visible externally, similar to 'static' linkage in C.
Halide::target_feature_for_device_api
Target::Feature target_feature_for_device_api(DeviceAPI api)
Get the Target feature corresponding to a DeviceAPI.
Halide::get_jit_target_from_environment
Target get_jit_target_from_environment()
Return the target that Halide will use for jit-compilation.
Halide::DeviceAPI
DeviceAPI
An enum describing a type of device API.
Definition: DeviceAPI.h:15
Halide::get_target_from_environment
Target get_target_from_environment()
Return the target that Halide will use.
uint64_t
unsigned __INT64_TYPE__ uint64_t
Definition: runtime_internal.h:23
int64_t
signed __INT64_TYPE__ int64_t
Definition: runtime_internal.h:22
Halide::Target
A struct representing a target machine and os to generate code for.
Definition: Target.h:19
Halide::Target::get_runtime_compatible_target
bool get_runtime_compatible_target(const Target &other, Target &result)
Create a "greatest common denominator" runtime target that is compatible with both this target and ot...
Halide::Target::operator==
bool operator==(const Target &other) const
Definition: Target.h:279
Halide::Target::supports_type
bool supports_type(const Type &t, DeviceAPI device) const
Does this target allow using a certain type on a certain device.
Halide::Target::supports_device_api
bool supports_device_api(DeviceAPI api) const
Returns whether a particular device API can be used with this Target.
Halide::Target::get_arm_v8_lower_bound
int get_arm_v8_lower_bound() const
Get the minimum ARM v8.x capability found as an integer.
Halide::Target::has_gpu_feature
bool has_gpu_feature() const
Is a fully feature GPU compute runtime enabled? I.e.
Halide::Target::feature_to_name
static std::string feature_to_name(Target::Feature feature)
Return the name corresponding to a given Feature, in the form used to construct Target strings (e....
Halide::Target::feature_from_name
static Target::Feature feature_from_name(const std::string &name)
Return the feature corresponding to a given name, in the form used to construct Target strings (e....
Halide::Target::Target
Target(OS o, Arch a, int b, const std::vector< Feature > &initial_features=std::vector< Feature >())
Definition: Target.h:199
Halide::Target::set_features
void set_features(const std::vector< Feature > &features_to_set, bool value=true)
Halide::Target::has_large_buffers
bool has_large_buffers() const
Return true iff 64 bits and has_feature(LargeBuffers).
Definition: Target.h:327
Halide::Target::arch
enum Halide::Target::Arch arch
Halide::Target::maximum_buffer_size
int64_t maximum_buffer_size() const
Return the maximum buffer size in bytes supported on this Target.
Definition: Target.h:334
Halide::Target::has_feature
bool has_feature(Feature f) const
Halide::Target::natural_vector_size
int natural_vector_size() const
Given a data type, return an estimate of the "natural" vector size for that data type when compiling ...
Definition: Target.h:322
Halide::Target::Target
Target()=default
Halide::Target::Target
Target(const std::string &s)
Given a string of the form used in HL_TARGET (e.g.
Halide::Target::processor_tune
enum Halide::Target::Processor processor_tune
Halide::Target::bits
int bits
The bit-width of the target machine.
Definition: Target.h:50
Halide::Target::Processor
Processor
The specific processor to be targeted, tuned for.
Definition: Target.h:61
Halide::Target::BdVer3
@ BdVer3
Tune for AMD Piledriver CPU (AMD Family 15h (2nd-gen), launched 2012).
Definition: Target.h:70
Halide::Target::ZnVer4
@ ZnVer4
Tune for AMD Zen 3 CPU (AMD Family 19h, launched 2020).
Definition: Target.h:76
Halide::Target::AMDFam10
@ AMDFam10
Tune for later versions of AMD K8 CPU, with SSE3 support.
Definition: Target.h:66
Halide::Target::ZnVer3
@ ZnVer3
Tune for AMD Zen 2 CPU (AMD Family 17h, launched 2019).
Definition: Target.h:75
Halide::Target::K8_SSE3
@ K8_SSE3
Tune for AMD K8 Hammer CPU (AMD Family 0Fh, launched 2003).
Definition: Target.h:65
Halide::Target::ZnVer1
@ ZnVer1
Tune for AMD Jaguar CPU (AMD Family 16h, launched 2013).
Definition: Target.h:73
Halide::Target::BdVer1
@ BdVer1
Tune for AMD Bobcat CPU (AMD Family 14h, launched 2011).
Definition: Target.h:68
Halide::Target::K8
@ K8
Definition: Target.h:64
Halide::Target::BtVer1
@ BtVer1
Tune for AMD K10 "Barcelona" CPU (AMD Family 10h, launched 2007).
Definition: Target.h:67
Halide::Target::ZnVer2
@ ZnVer2
Tune for AMD Zen CPU (AMD Family 17h, launched 2017).
Definition: Target.h:74
Halide::Target::ZnVer5
@ ZnVer5
Tune for AMD Zen 4 CPU (AMD Family 19h, launched 2022).
Definition: Target.h:77
Halide::Target::BdVer4
@ BdVer4
Tune for AMD Steamroller CPU (AMD Family 15h (3nd-gen), launched 2014).
Definition: Target.h:71
Halide::Target::BdVer2
@ BdVer2
Tune for AMD Bulldozer CPU (AMD Family 15h, launched 2011).
Definition: Target.h:69
Halide::Target::BtVer2
@ BtVer2
Tune for AMD Excavator CPU (AMD Family 15h (4th-gen), launched 2015).
Definition: Target.h:72
Halide::Target::ProcessorGeneric
@ ProcessorGeneric
Do not tune for any specific CPU. In practice, this means that halide will decide the tune CPU based ...
Definition: Target.h:63
Halide::Target::Target
Target(OS o, Arch a, int b, Processor pt, const std::vector< Feature > &initial_features=std::vector< Feature >(), int vb=0)
Definition: Target.h:190
Halide::Target::os
enum Halide::Target::OS os
Halide::Target::to_string
std::string to_string() const
Convert the Target into a string form that can be reconstituted by merge_string(),...
Halide::Target::validate_target_string
static bool validate_target_string(const std::string &s)
Check if a target string is valid.
Halide::Target::without_feature
Target without_feature(Feature f) const
Return a copy of the target with the given feature cleared.
Halide::Target::get_features_bitset
const std::bitset< FeatureEnd > & get_features_bitset() const
Return a bitset of the Featuress set in this Target (set = 1).
Definition: Target.h:362
Halide::Target::Feature
Feature
Optional features a target can have.
Definition: Target.h:84
Halide::Target::CUDACapability86
@ CUDACapability86
Definition: Target.h:110
Halide::Target::CUDACapability50
@ CUDACapability50
Definition: Target.h:105
Halide::Target::CheckUnsafePromises
@ CheckUnsafePromises
Definition: Target.h:147
Halide::Target::HexagonDma
@ HexagonDma
Definition: Target.h:122
Halide::Target::CUDACapability70
@ CUDACapability70
Definition: Target.h:107
Halide::Target::MSAN
@ MSAN
Definition: Target.h:131
Halide::Target::WasmBulkMemory
@ WasmBulkMemory
Definition: Target.h:153
Halide::Target::EGL
@ EGL
Definition: Target.h:115
Halide::Target::AVX512_KNL
@ AVX512_KNL
Definition: Target.h:133
Halide::Target::CUDACapability35
@ CUDACapability35
Definition: Target.h:104
Halide::Target::FeatureEnd
@ FeatureEnd
Definition: Target.h:187
Halide::Target::AVX512_Zen4
@ AVX512_Zen4
Definition: Target.h:137
Halide::Target::NoAsserts
@ NoAsserts
Definition: Target.h:88
Halide::Target::VulkanFloat64
@ VulkanFloat64
Definition: Target.h:179
Halide::Target::ARMv82a
@ ARMv82a
Definition: Target.h:163
Halide::Target::EnableLLVMLoopOpt
@ EnableLLVMLoopOpt
Definition: Target.h:149
Halide::Target::EnableBacktraces
@ EnableBacktraces
Definition: Target.h:87
Halide::Target::TraceRealizations
@ TraceRealizations
Definition: Target.h:141
Halide::Target::AVX512_Zen5
@ AVX512_Zen5
Definition: Target.h:138
Halide::Target::ARMv8a
@ ARMv8a
Definition: Target.h:161
Halide::Target::ARMv84a
@ ARMv84a
Definition: Target.h:165
Halide::Target::ARMv85a
@ ARMv85a
Definition: Target.h:166
Halide::Target::AVX512_Cannonlake
@ AVX512_Cannonlake
Definition: Target.h:135
Halide::Target::ARMDotProd
@ ARMDotProd
Definition: Target.h:157
Halide::Target::HVX_v65
@ HVX_v65
Definition: Target.h:126
Halide::Target::AVX10_1
@ AVX10_1
Definition: Target.h:184
Halide::Target::CUDACapability61
@ CUDACapability61
Definition: Target.h:106
Halide::Target::ARMv81a
@ ARMv81a
Definition: Target.h:162
Halide::Target::SVE
@ SVE
Definition: Target.h:155
Halide::Target::Vulkan
@ Vulkan
Definition: Target.h:174
Halide::Target::VSX
@ VSX
Definition: Target.h:99
Halide::Target::AVX512_SapphireRapids
@ AVX512_SapphireRapids
Definition: Target.h:136
Halide::Target::ARMv86a
@ ARMv86a
Definition: Target.h:167
Halide::Target::TSAN
@ TSAN
Definition: Target.h:145
Halide::Target::AVX512
@ AVX512
Definition: Target.h:132
Halide::Target::ARMv83a
@ ARMv83a
Definition: Target.h:164
Halide::Target::HVX_v66
@ HVX_v66
Definition: Target.h:127
Halide::Target::AVX
@ AVX
Definition: Target.h:91
Halide::Target::WasmMvpOnly
@ WasmMvpOnly
Definition: Target.h:150
Halide::Target::VulkanV13
@ VulkanV13
Definition: Target.h:182
Halide::Target::WasmSimd128
@ WasmSimd128
Definition: Target.h:151
Halide::Target::SoftFloatABI
@ SoftFloatABI
Definition: Target.h:130
Halide::Target::WasmThreads
@ WasmThreads
Definition: Target.h:152
Halide::Target::FMA4
@ FMA4
Definition: Target.h:95
Halide::Target::VulkanV12
@ VulkanV12
Definition: Target.h:181
Halide::Target::Metal
@ Metal
Definition: Target.h:119
Halide::Target::StrictFloat
@ StrictFloat
Definition: Target.h:144
Halide::Target::NoBoundsQuery
@ NoBoundsQuery
Definition: Target.h:89
Halide::Target::ARMv88a
@ ARMv88a
Definition: Target.h:169
Halide::Target::CUDACapability32
@ CUDACapability32
Definition: Target.h:103
Halide::Target::HVX
@ HVX
Definition: Target.h:124
Halide::Target::NoNEON
@ NoNEON
Definition: Target.h:98
Halide::Target::AVX512_Skylake
@ AVX512_Skylake
Definition: Target.h:134
Halide::Target::ProfileByTimer
@ ProfileByTimer
Definition: Target.h:172
Halide::Target::ARMv89a
@ ARMv89a
Definition: Target.h:170
Halide::Target::HVX_v62
@ HVX_v62
Definition: Target.h:125
Halide::Target::WebGPU
@ WebGPU
Definition: Target.h:154
Halide::Target::CLHalf
@ CLHalf
Definition: Target.h:113
Halide::Target::SanitizerCoverage
@ SanitizerCoverage
Definition: Target.h:171
Halide::Target::OpenCL
@ OpenCL
Definition: Target.h:111
Halide::Target::VulkanInt16
@ VulkanInt16
Definition: Target.h:176
Halide::Target::SVE2
@ SVE2
Definition: Target.h:156
Halide::Target::NoRuntime
@ NoRuntime
Definition: Target.h:118
Halide::Target::VulkanInt64
@ VulkanInt64
Definition: Target.h:177
Halide::Target::FMA
@ FMA
Definition: Target.h:94
Halide::Target::LLVMLargeCodeModel
@ LLVMLargeCodeModel
Definition: Target.h:159
Halide::Target::Semihosting
@ Semihosting
Definition: Target.h:183
Halide::Target::CLDoubles
@ CLDoubles
Definition: Target.h:112
Halide::Target::AVXVNNI
@ AVXVNNI
Definition: Target.h:93
Halide::Target::CLAtomics64
@ CLAtomics64
Definition: Target.h:114
Halide::Target::TracePipeline
@ TracePipeline
Definition: Target.h:142
Halide::Target::CUDACapability30
@ CUDACapability30
Definition: Target.h:102
Halide::Target::ARMv87a
@ ARMv87a
Definition: Target.h:168
Halide::Target::Simulator
@ Simulator
Definition: Target.h:186
Halide::Target::UserContext
@ UserContext
Definition: Target.h:116
Halide::Target::ARMFp16
@ ARMFp16
Definition: Target.h:158
Halide::Target::CUDACapability80
@ CUDACapability80
Definition: Target.h:109
Halide::Target::HVX_128
@ HVX_128
Definition: Target.h:123
Halide::Target::RVV
@ RVV
Definition: Target.h:160
Halide::Target::CUDA
@ CUDA
Definition: Target.h:101
Halide::Target::JIT
@ JIT
Definition: Target.h:85
Halide::Target::CPlusPlusMangling
@ CPlusPlusMangling
Definition: Target.h:120
Halide::Target::SPIRV
@ SPIRV
Definition: Target.h:173
Halide::Target::X86APX
@ X86APX
Definition: Target.h:185
Halide::Target::AVX2
@ AVX2
Definition: Target.h:92
Halide::Target::EmbedBitcode
@ EmbedBitcode
Definition: Target.h:148
Halide::Target::TraceStores
@ TraceStores
Definition: Target.h:140
Halide::Target::HVX_v68
@ HVX_v68
Definition: Target.h:128
Halide::Target::D3D12Compute
@ D3D12Compute
Definition: Target.h:143
Halide::Target::ASAN
@ ASAN
Definition: Target.h:146
Halide::Target::CUDACapability75
@ CUDACapability75
Definition: Target.h:108
Halide::Target::LargeBuffers
@ LargeBuffers
Definition: Target.h:121
Halide::Target::FuzzFloatStores
@ FuzzFloatStores
Definition: Target.h:129
Halide::Target::Profile
@ Profile
Definition: Target.h:117
Halide::Target::ARMv7s
@ ARMv7s
Definition: Target.h:97
Halide::Target::Debug
@ Debug
Definition: Target.h:86
Halide::Target::VulkanFloat16
@ VulkanFloat16
Definition: Target.h:178
Halide::Target::VulkanInt8
@ VulkanInt8
Definition: Target.h:175
Halide::Target::SSE41
@ SSE41
Definition: Target.h:90
Halide::Target::POWER_ARCH_2_07
@ POWER_ARCH_2_07
Definition: Target.h:100
Halide::Target::VulkanV10
@ VulkanV10
Definition: Target.h:180
Halide::Target::F16C
@ F16C
Definition: Target.h:96
Halide::Target::TraceLoads
@ TraceLoads
Definition: Target.h:139
Halide::Target::operator!=
bool operator!=(const Target &other) const
Definition: Target.h:287
Halide::Target::supported
bool supported() const
Was libHalide compiled with support for this target?
Halide::Target::get_required_device_api
DeviceAPI get_required_device_api() const
If this Target (including all Features) requires a specific DeviceAPI, return it.
Halide::Target::has_feature
bool has_feature(halide_target_feature_t f) const
Definition: Target.h:231
Halide::Target::has_unknowns
bool has_unknowns() const
Return true if any of the arch/bits/os fields are "unknown"/0; return false otherwise.
Halide::Target::features_any_of
bool features_any_of(const std::vector< Feature > &test_features) const
Halide::Target::set_feature
void set_feature(Feature f, bool value=true)
Halide::Target::supports_type
bool supports_type(const Type &t) const
Does this target allow using a certain type.
Halide::Target::get_vulkan_capability_lower_bound
int get_vulkan_capability_lower_bound() const
Get the minimum Vulkan capability found as an integer.
Halide::Target::get_cuda_capability_lower_bound
int get_cuda_capability_lower_bound() const
Get the minimum cuda capability found as an integer.
Halide::Target::with_feature
Target with_feature(Feature f) const
Return a copy of the target with the given feature set.
Halide::Target::natural_vector_size
int natural_vector_size(const Halide::Type &t) const
Given a data type, return an estimate of the "natural" vector size for that data type when compiling ...
Halide::Target::features_all_of
bool features_all_of(const std::vector< Feature > &test_features) const
Halide::Target::Arch
Arch
The architecture used by the target.
Definition: Target.h:39
Halide::Target::POWERPC
@ POWERPC
Definition: Target.h:44
Halide::Target::RISCV
@ RISCV
Definition: Target.h:46
Halide::Target::ARM
@ ARM
Definition: Target.h:42
Halide::Target::Hexagon
@ Hexagon
Definition: Target.h:43
Halide::Target::WebAssembly
@ WebAssembly
Definition: Target.h:45
Halide::Target::X86
@ X86
Definition: Target.h:41
Halide::Target::ArchUnknown
@ ArchUnknown
Definition: Target.h:40
Halide::Target::OS
OS
The operating system used by the target.
Definition: Target.h:23
Halide::Target::OSUnknown
@ OSUnknown
Definition: Target.h:24
Halide::Target::Windows
@ Windows
Definition: Target.h:26
Halide::Target::Android
@ Android
Definition: Target.h:28
Halide::Target::WebAssemblyRuntime
@ WebAssemblyRuntime
Definition: Target.h:33
Halide::Target::NoOS
@ NoOS
Definition: Target.h:31
Halide::Target::IOS
@ IOS
Definition: Target.h:29
Halide::Target::Fuchsia
@ Fuchsia
Definition: Target.h:32
Halide::Target::OSX
@ OSX
Definition: Target.h:27
Halide::Target::Linux
@ Linux
Definition: Target.h:25
Halide::Target::QuRT
@ QuRT
Definition: Target.h:30
Halide::Target::vector_bits
int vector_bits
The bit-width of a vector register for targets where this is configurable and targeting a fixed size ...
Definition: Target.h:55
Halide::Target::Target
Target(const char *s)
Halide::Type
Types in the halide type system.
Definition: Type.h:283