载入中...
搜索中...
未找到
GpuBackend.h
浏览该文件的文档.
1
2#include "common/Export.h"
3#ifndef EVE_TENSOR_GPUBACKEND_H
4#define EVE_TENSOR_GPUBACKEND_H
5
6#include <vector>
7
8namespace eve::tensor {
9
10class Graph;
11struct OptimizedGraph;
12
29public:
32
34 static GpuProgram *tryBuild(const Graph &graph, const OptimizedGraph &opt, int outputNode);
35
37 std::vector<float> run(const std::vector<const float *> &feeds) const;
38
39private:
40 GpuProgram();
41 GpuProgram(const GpuProgram &) = delete;
42 GpuProgram &operator=(const GpuProgram &) = delete;
43
44 struct Impl;
45 Impl *impl_ = nullptr;
46};
47
54EVENGINE_API_DOMAINS bool gpuReduce(const float *data, int size, int op, float &outResult);
55
56} // namespace eve::tensor
57
58#endif // EVE_TENSOR_GPUBACKEND_H
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::weak_ptr< Run > run
Definition OnnxGpgpu.cpp:25
std::map< std::string, std::vector< std::string > > graph
Definition Package.cpp:59
float size
Definition TreeMesh.cpp:156
GPU execution of a compiled tensor Graph via generated compute shaders.
Definition GpuBackend.h:28
EVENGINE_API_DOMAINS public API.
Definition Graph.h:111
bool gpuReduce(const float *data, int size, int op, float &outResult)
GPU-accelerated reduction for large eager tensors. op: 0 = sum, 1 = min, 2 = max. Returns false (call...
OptimizedGraph public API.
Definition Optimizer.h:77