Added initial base for opcreatetensor
This commit is contained in:
parent
93041b4519
commit
014f15d552
14 changed files with 422 additions and 61 deletions
12
src/main.cpp
12
src/main.cpp
|
|
@ -20,7 +20,8 @@
|
|||
#include <vulkan/vulkan.h>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
#include "BaseOp.hpp"
|
||||
#include "OpCreateTensor.hpp"
|
||||
#include "Tensor.hpp"
|
||||
#include "Manager.hpp"
|
||||
|
||||
#define BUFFER_ELEMENTS 32
|
||||
|
|
@ -619,9 +620,14 @@ main()
|
|||
// Run Kompute
|
||||
spdlog::info("Creating manager");
|
||||
kp::Manager mgr;
|
||||
spdlog::info("Calling manager eval");
|
||||
mgr.eval<kp::BaseOp>("one", "two");
|
||||
std::vector<uint32_t> data = {0.0, 1.0, 2.0};
|
||||
kp::Tensor tensor({data.size()});
|
||||
spdlog::info("Calling manager eval w opcreatetensor");
|
||||
mgr.evalOp<kp::OpCreateTensor>(&tensor, data);
|
||||
spdlog::info("Called manager eval success");
|
||||
std::vector<uint32_t> outData = tensor.data();
|
||||
spdlog::info("Output data: {}", outData);
|
||||
|
||||
return 0;
|
||||
} catch (const std::exception& exc) {
|
||||
spdlog::error(exc.what());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue