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
|
|
@ -51,19 +51,9 @@ void KomputeModelML::train(std::vector<float> yData, std::vector<float> xIData,
|
|||
|
||||
sq->record<kp::OpTensorSyncDevice>({ wIn, bIn });
|
||||
|
||||
#ifdef KOMPUTE_ANDROID_SHADER_FROM_STRING
|
||||
// Newer versions of Android are able to use shaderc to read raw string
|
||||
sq->record<kp::OpAlgoBase>(
|
||||
params, std::vector<uint32_t>(LR_SHADER.begin(), LR_SHADER.end()));
|
||||
#else
|
||||
// Older versions of Android require the SPIRV binary directly
|
||||
sq->record<kp::OpAlgoBase>(
|
||||
params, std::vector<uint32_t>(
|
||||
kp::shader_data::shaders_glsl_logisticregression_comp_spv,
|
||||
kp::shader_data::shaders_glsl_logisticregression_comp_spv
|
||||
+ kp::shader_data::shaders_glsl_logisticregression_comp_spv_len
|
||||
));
|
||||
#endif
|
||||
params, kp::Shader::compile_source(LR_SHADER));
|
||||
|
||||
sq->record<kp::OpTensorSyncLocal>({ wOutI, wOutJ, bOut, lOut });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue