Skip to content

Commit b856450

Browse files
committed
[CodeClean/Test] invalid option
Code clean, add definition on ubuntu test and fix invalid property value. Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
1 parent a322656 commit b856450

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ if ncnn_dep.found()
183183
add_project_arguments('-DENABLE_NCNN=1', language: ['c', 'cpp'])
184184
endif
185185

186+
# llama.cpp
187+
llamacpp_dep = dependency('llama', required: false)
188+
if llamacpp_dep.found()
189+
add_project_arguments('-DENABLE_LLAMACPP=1', language: ['c', 'cpp'])
190+
endif
191+
186192
# Set install path
187193
api_install_prefix = get_option('prefix')
188194
api_install_libdir = join_paths(api_install_prefix, get_option('libdir'))

tests/capi/unittest_capi_inference.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,9 +2332,11 @@ TEST (nnstreamer_capi_util, availability_06)
23322332
EXPECT_EQ (status, ML_ERROR_NONE);
23332333
EXPECT_EQ (result, true);
23342334

2335+
#if defined(__aarch64__) || defined(__arm__)
23352336
status = ml_check_nnfw_availability (ML_NNFW_TYPE_ARMNN, ML_NNFW_HW_CPU_NEON, &result);
23362337
EXPECT_EQ (status, ML_ERROR_NONE);
23372338
EXPECT_EQ (result, true);
2339+
#endif
23382340

23392341
status = ml_check_nnfw_availability (ML_NNFW_TYPE_ARMNN, ML_NNFW_HW_GPU, &result);
23402342
EXPECT_EQ (status, ML_ERROR_NONE);
@@ -6743,7 +6745,7 @@ TEST (nnstreamer_capi_element, get_property_enum_04_n)
67436745
status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
67446746
EXPECT_EQ (status, ML_ERROR_NONE);
67456747

6746-
status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "1,2");
6748+
status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
67476749
EXPECT_EQ (status, ML_ERROR_NONE);
67486750

67496751
/* Test Code */

tests/capi/unittest_capi_service_extension.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ _extension_test_imgclf (ml_service_h handle, gboolean is_pipeline)
390390
_free_test_data (tdata);
391391
}
392392

393+
#if defined(ENABLE_LLAMACPP)
393394
/**
394395
* @brief Callback function for scenario test.
395396
*/
@@ -491,7 +492,7 @@ TEST (MLServiceExtension, scenarioConfigLlamacpp)
491492
status = ml_service_destroy (handle);
492493
EXPECT_EQ (status, ML_ERROR_NONE);
493494
}
494-
495+
#endif /* ENABLE_LLAMACPP */
495496

496497
/**
497498
* @brief Usage of ml-service extension API.

0 commit comments

Comments
 (0)