Skip to content

Commit d350d1f

Browse files
committed
New vx_string type and enabling onnxrt integration test
1 parent 961931e commit d350d1f

File tree

3 files changed

+66
-30
lines changed

3 files changed

+66
-30
lines changed

include/VX/vx_corevx_ext.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @file vx_corevx_ext.h
3-
* @brief Extensions enabled for corevs
3+
* @brief Extensions enabled for corevx
44
* @version 0.1
55
* @date 2024-12-15
66
*
@@ -10,9 +10,25 @@
1010
#ifndef VX_COREVX_EXT_H
1111
#define VX_COREVX_EXT_H
1212

13+
#include <string>
14+
1315
#include <VX/vx_kernels.h>
1416
#include <VX/vx_types.h>
1517

18+
/*! \brief A character array (string) type.
19+
* \note This is a C++ string type. It is not a C string.
20+
* \ingroup group_basic_features
21+
*/
22+
using vx_string = std::string;
23+
24+
/*! \brief The type enumeration lists additional types to extend the known types in OpenVX.
25+
* \ingroup group_basic_features
26+
*/
27+
enum vx_type_ext_e
28+
{
29+
VX_TYPE_STRING = 0x818, /*!< \brief A <tt>\ref vx_string</tt>. */
30+
};
31+
1632
/*! \brief Define Edge AI Vendor ID
1733
* \ingroup group_basic_features
1834
*/

tests/integration_test/BUILD

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# cc_test(
2-
# name = "test_ort",
3-
# srcs = [
4-
# "test_ort.cpp"
5-
# ],
6-
# includes = [
7-
# "include",
8-
# "framework/include"
9-
# ],
10-
# deps = [
11-
# "//:corevx",
12-
# "@googletest//:gtest_main",
13-
# "//targets/c_model:imported_openvx_c_model",
14-
# "//targets/debug:imported_openvx_debug",
15-
# "//targets/extras:imported_openvx_extras",
16-
# "//targets/opencl:imported_openvx_opencl",
17-
# "//targets/onnxRT:imported_openvx_onnxRT",
18-
# ],
19-
# linkopts = select({
20-
# "@platforms//os:linux": ["-Wl,-rpath,$ORIGIN"],
21-
# "@platforms//os:macos": ["-Wl,-rpath,@executable_path"],
22-
# "//conditions:default": [],
23-
# }),
24-
# data = [
25-
# "//tests/raw:models",
26-
# ],
27-
# size = "small"
28-
# )
1+
cc_test(
2+
name = "test_ort",
3+
srcs = [
4+
"test_ort.cpp"
5+
],
6+
includes = [
7+
"include",
8+
"framework/include"
9+
],
10+
deps = [
11+
"//:corevx",
12+
"@googletest//:gtest_main",
13+
"//targets/c_model:imported_openvx_c_model",
14+
"//targets/debug:imported_openvx_debug",
15+
"//targets/extras:imported_openvx_extras",
16+
"//targets/opencl:imported_openvx_opencl",
17+
"//targets/onnxRT:imported_openvx_onnxRT",
18+
],
19+
linkopts = select({
20+
"@platforms//os:linux": ["-Wl,-rpath,$ORIGIN"],
21+
"@platforms//os:macos": ["-Wl,-rpath,@executable_path"],
22+
"//conditions:default": [],
23+
}),
24+
data = [
25+
"//tests/raw:models",
26+
],
27+
size = "small"
28+
)

third_party/patch/onnx.patch

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,24 @@ index 9219f16be0..e1559bd3da 100644
2222
+google_nsync;https://github.com/amikhail48/nsync/archive/refs/tags/1.29.3.zip;1cdfb3b740dadf9a6cc6d6b65976d31f9d9c2900
2323
googletest;https://github.com/google/googletest/archive/refs/tags/v1.15.0.zip;9d2d0af8d77ac726ea55d44a8fa727ec98311349
2424
#xnnpack 2024.09.04
25-
googlexnnpack;https://github.com/google/XNNPACK/archive/309b75c9e56e0a674bf78d59872ce131f814dfb6.zip;39FA5259EAEACE0547284B63D5CEDC4F05553F5A
25+
googlexnnpack;https://github.com/google/XNNPACK/archive/309b75c9e56e0a674bf78d59872ce131f814dfb6.zip;39FA5259EAEACE0547284B63D5CEDC4F05553F5A
26+
diff --git a/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h b/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h
27+
index af6f52090a..37ae94f1ae 100644
28+
--- onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h
29+
+++ onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h
30+
@@ -6,10 +6,11 @@
31+
#include "sqnbitgemm.h"
32+
#include "sqnbitgemm_kernel_avx_common.h"
33+
34+
+#pragma GCC diagnostic push
35+
+#pragma GCC diagnostic ignored "-Warray-bounds"
36+
37+
MLAS_FORCEINLINE void
38+
@@ -1044,6 +1050,7 @@ MlasQ4Int8TileGemmKernelBlkLen32Avx2(
39+
BiasPtr += BiasPtr != nullptr ? 1 : 0;
40+
SumPtr += 1;
41+
}
42+
} // m
43+
return CountM;
44+
}
45+
+#pragma GCC diagnostic pop

0 commit comments

Comments
 (0)