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

Allowed int64 constants in ONNX parser (#25148)

* Removed automatic int64 to int32 conversion in ONNX parser

* Fixed wrong rebase code

* added tests, minor fixes

* fixed Cast layer

* Fixed Cast layer for fp16 backend

* Fixed Cast layer for fp16 backend

* Fixed Cast layer for fp16 backend

* Allowed uint32, int64, uint64 types in OpenCL

* Fixed Cast layer for fp16 backend

* Use randu in test_int

---------

Co-authored-by: Alexander Lyulkov <alexander.lyulkov@opencv.ai>
This commit is contained in:
alexlyulkov
2024-03-13 11:48:23 +03:00
committed by GitHub
parent de29223217
commit 85cc02f4de
12 changed files with 557 additions and 134 deletions
+5 -1
View File
@@ -6979,7 +6979,11 @@ const char* typeToStr(int type)
"float", "float2", "float3", "float4", 0, 0, 0, "float8", 0, 0, 0, 0, 0, 0, 0, "float16",
"double", "double2", "double3", "double4", 0, 0, 0, "double8", 0, 0, 0, 0, 0, 0, 0, "double16",
"half", "half2", "half3", "half4", 0, 0, 0, "half8", 0, 0, 0, 0, 0, 0, 0, "half16",
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // CV_16BF
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // CV_Bool
"ulong", "ulong2", "ulong3", "ulong4", 0, 0, 0, "ulong8", 0, 0, 0, 0, 0, 0, 0, "ulong16",
"long", "long2", "long3", "long4", 0, 0, 0, "long8", 0, 0, 0, 0, 0, 0, 0, "long16",
"uint", "uint2", "uint3", "uint4", 0, 0, 0, "uint8", 0, 0, 0, 0, 0, 0, 0, "uint16"
};
int cn = CV_MAT_CN(type), depth = CV_MAT_DEPTH(type);
const char* result = cn > 16 ? nullptr : tab[depth*16 + cn-1];