Loading...
Searching...
No Matches
DeviceAPI.h
Go to the documentation of this file.
#ifndef HALIDE_DEVICEAPI_H
#define HALIDE_DEVICEAPI_H
/** \file
* Defines DeviceAPI.
*/
#include <string>
#include <vector>
namespace Halide {
/** An enum describing a type of device API. Used by schedules, and in
* the For loop IR node. */
enum class DeviceAPI {
None, /// Used to denote for loops that run on the same device as the containing code.
Host,
Default_GPU,
CUDA,
OpenCL,
Metal,
Hexagon,
HexagonDma,
D3D12Compute,
Vulkan,
WebGPU,
};
/** An array containing all the device apis. Useful for iterating
* through them. */
const DeviceAPI all_device_apis[] = {DeviceAPI::None,
DeviceAPI::Host,
DeviceAPI::Default_GPU,
DeviceAPI::CUDA,
DeviceAPI::OpenCL,
DeviceAPI::Metal,
DeviceAPI::Hexagon,
DeviceAPI::HexagonDma,
DeviceAPI::D3D12Compute,
DeviceAPI::Vulkan,
DeviceAPI::WebGPU};
} // namespace Halide
#endif // HALIDE_DEVICEAPI_H
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::DeviceAPI
DeviceAPI
An enum describing a type of device API.
Definition DeviceAPI.h:15
Halide::DeviceAPI::Hexagon
@ Hexagon
Definition DeviceAPI.h:22
Halide::DeviceAPI::Vulkan
@ Vulkan
Definition DeviceAPI.h:25
Halide::DeviceAPI::HexagonDma
@ HexagonDma
Definition DeviceAPI.h:23
Halide::DeviceAPI::None
@ None
Definition DeviceAPI.h:16
Halide::DeviceAPI::OpenCL
@ OpenCL
Definition DeviceAPI.h:20
Halide::DeviceAPI::CUDA
@ CUDA
Definition DeviceAPI.h:19
Halide::DeviceAPI::D3D12Compute
@ D3D12Compute
Definition DeviceAPI.h:24
Halide::DeviceAPI::Host
@ Host
Used to denote for loops that run on the same device as the containing code.
Definition DeviceAPI.h:17
Halide::DeviceAPI::WebGPU
@ WebGPU
Definition DeviceAPI.h:26
Halide::DeviceAPI::Metal
@ Metal
Definition DeviceAPI.h:21
Halide::DeviceAPI::Default_GPU
@ Default_GPU
Definition DeviceAPI.h:18
Halide::all_device_apis
const DeviceAPI all_device_apis[]
An array containing all the device apis.
Definition DeviceAPI.h:31