Updated examples to match new shader api
This commit is contained in:
parent
92f556ff57
commit
82a56b7e85
10 changed files with 20 additions and 59 deletions
|
|
@ -18,7 +18,6 @@ int main()
|
|||
auto tensorInB = mgr.tensor({ 0.0, 1.0, 2.0 });
|
||||
auto tensorOut = mgr.tensor({ 0.0, 0.0, 0.0 });
|
||||
|
||||
#ifdef KOMPUTE_ANDROID_SHADER_FROM_STRING
|
||||
std::string shader(R"(
|
||||
// The version to use
|
||||
#version 450
|
||||
|
|
@ -40,15 +39,7 @@ int main()
|
|||
|
||||
mgr.evalOpDefault<kp::OpAlgoBase>(
|
||||
{ tensorInA, tensorInB, tensorOut },
|
||||
std::vector<uint32_t>(shader.begin(), shader.end()));
|
||||
#else
|
||||
mgr.evalOpDefault<kp::OpAlgoBase>(
|
||||
{ tensorInA, tensorInB, tensorOut },
|
||||
std::vector<uint32_t>(
|
||||
kp::shader_data::shaders_glsl_opmult_comp_spv,
|
||||
kp::shader_data::shaders_glsl_opmult_comp_spv
|
||||
+ kp::shader_data::shaders_glsl_opmult_comp_spv_len));
|
||||
#endif
|
||||
kp::Shader::compile_source(shader));
|
||||
|
||||
mgr.evalOpDefault<kp::OpTensorSyncLocal>({tensorOut});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue