mirror of
https://github.com/nomic-ai/kompute.git
synced 2026-05-11 08:59:59 +00:00
Added further tests including lr
This commit is contained in:
5
.github/workflows/cpp_ubuntu.yml
vendored
5
.github/workflows/cpp_ubuntu.yml
vendored
@@ -36,11 +36,10 @@ jobs:
|
||||
make -C build/ -j
|
||||
- name: tests
|
||||
run: |
|
||||
#only running tests that dont require GLSL compilation
|
||||
./build/test/test_kompute --gtest_filter="TestMainLogisticRegression.*"
|
||||
# Only running tests that dont require GLSL compilation
|
||||
./build/test/test_kompute --gtest_filter="TestLogisticRegressionAlgorithm.*"
|
||||
./build/test/test_kompute --gtest_filter="TestManager.*"
|
||||
./build/test/test_kompute --gtest_filter="TestOpAlgoBase.ShaderCompiledDataFromConstructor"
|
||||
#./build/test/test_kompute --gtest_filter="TestOpAlgoBase.ShaderCompiledDataFromFile"
|
||||
./build/test/test_kompute --gtest_filter="TestOpTensorCopy.*"
|
||||
./build/test/test_kompute --gtest_filter="TestOpTensorCreate.*"
|
||||
./build/test/test_kompute --gtest_filter="TestOpTensorSync.*"
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "kompute/Kompute.hpp"
|
||||
|
||||
#include "kompute_test/shaders/shadertest_logistic_regression.hpp"
|
||||
|
||||
TEST(TestLogisticRegressionAlgorithm, TestMainLogisticRegression)
|
||||
{
|
||||
|
||||
@@ -44,8 +46,18 @@ TEST(TestLogisticRegressionAlgorithm, TestMainLogisticRegression)
|
||||
|
||||
sq->record<kp::OpTensorSyncDevice>({ wIn, bIn });
|
||||
|
||||
#ifdef KOMPUTE_SHADER_FROM_STRING
|
||||
sq->record<kp::OpAlgoBase>(
|
||||
params, "test/shaders/glsl/test_logistic_regression.comp.spv");
|
||||
#else
|
||||
sq->record<kp::OpAlgoBase>(
|
||||
params,
|
||||
std::vector<char>(
|
||||
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
|
||||
|
||||
sq->record<kp::OpTensorSyncLocal>({ wOutI, wOutJ, bOut, lOut });
|
||||
|
||||
@@ -123,8 +135,18 @@ TEST(TestLogisticRegressionAlgorithm, TestMainLogisticRegressionManualCopy)
|
||||
// Record op algo base
|
||||
sq->begin();
|
||||
|
||||
#ifdef KOMPUTE_SHADER_FROM_STRING
|
||||
sq->record<kp::OpAlgoBase>(
|
||||
params, "test/shaders/glsl/test_logistic_regression.comp.spv");
|
||||
#else
|
||||
sq->record<kp::OpAlgoBase>(
|
||||
params,
|
||||
std::vector<char>(
|
||||
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
|
||||
|
||||
sq->record<kp::OpTensorSyncLocal>({ wOutI, wOutJ, bOut, lOut });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user