1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

moved to engine_opencv

This commit is contained in:
Abhishek Gola
2026-07-21 14:47:20 +05:30
parent c2e0e4edb9
commit 57bcf14e78
41 changed files with 119 additions and 130 deletions
+6 -6
View File
@@ -2252,7 +2252,7 @@ TEST(Layer_If, resize)
const std::string imgname = findDataFile("cv/shared/lena.png", true);
const std::string modelname = findDataFile("dnn/onnx/models/if_layer.onnx", true);
dnn::Net net = dnn::readNetFromONNX(modelname, ENGINE_NEW);
dnn::Net net = dnn::readNetFromONNX(modelname, ENGINE_OPENCV);
Mat src = imread(imgname), blob;
dnn::blobFromImage(src, blob, 1.0, cv::Size(), cv::Scalar(), false, false);
@@ -2276,7 +2276,7 @@ TEST(Layer_If, resize)
TEST(Layer_If, subgraph_name_scoping)
{
const std::string modelname = findDataFile("dnn/onnx/models/subgraph_name_scoping.onnx", true);
dnn::Net net = dnn::readNetFromONNX(modelname, ENGINE_NEW);
dnn::Net net = dnn::readNetFromONNX(modelname, ENGINE_OPENCV);
int xshape[1] = {2};
Mat x(1, xshape, CV_32F);
@@ -2313,7 +2313,7 @@ TEST(Layer_If, subgraph_name_scoping)
TEST(Layer_Size, onnx_1d)
{
const std::string modelname = findDataFile("dnn/onnx/models/test_size_1d_model.onnx", true);
cv::dnn::Net net = cv::dnn::readNetFromONNX(modelname, ENGINE_NEW);
cv::dnn::Net net = cv::dnn::readNetFromONNX(modelname, ENGINE_OPENCV);
int sz1d[1] = {7};
cv::Mat x(1, sz1d, CV_32F);
@@ -2332,7 +2332,7 @@ TEST(Layer_Size, onnx_1d)
TEST(Layer_Size, onnx_0d_scalar)
{
const std::string modelname = findDataFile("dnn/onnx/models/test_size_0d_model.onnx", true);
cv::dnn::Net net = cv::dnn::readNetFromONNX(modelname, ENGINE_NEW);
cv::dnn::Net net = cv::dnn::readNetFromONNX(modelname, ENGINE_OPENCV);
cv::Mat x(1, 1, CV_32F);
x.at<float>(0, 0) = 3.14f;
@@ -2397,9 +2397,9 @@ public:
{
std::string model_path = "dnn/onnx/models/test_attention_kv_cache_" + layout + ".onnx";
Net netWithKVCache = readNetFromONNX(findDataFile(model_path, true), cv::dnn::ENGINE_NEW);
Net netWithKVCache = readNetFromONNX(findDataFile(model_path, true), cv::dnn::ENGINE_OPENCV);
netWithKVCache.enableKVCache();
Net netWithoutKVCache = readNetFromONNX(findDataFile(model_path, true), cv::dnn::ENGINE_NEW);
Net netWithoutKVCache = readNetFromONNX(findDataFile(model_path, true), cv::dnn::ENGINE_OPENCV);
int T = 523, Nq = 8, Nkv = 4, D = 256;
// Keep the prefill larger than one cache page, then exercise generation