Skip to content

Commit d72b476

Browse files
authored
[ORT 1.18.0 Release] Cherry pick 2nd round (microsoft#20620)
1 parent 65f3fbf commit d72b476

File tree

87 files changed

+1916
-2107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1916
-2107
lines changed

cmake/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,8 @@ if (onnxruntime_USE_QNN)
797797
message(STATUS "Building MSVC for architecture ${CMAKE_SYSTEM_PROCESSOR} with CMAKE_GENERATOR_PLATFORM as ${GEN_PLATFORM}")
798798
if (${GEN_PLATFORM} STREQUAL "arm64")
799799
set(QNN_ARCH_ABI aarch64-windows-msvc)
800+
elseif (${GEN_PLATFORM} STREQUAL "arm64ec")
801+
set(QNN_ARCH_ABI arm64x-windows-msvc)
800802
else()
801803
set(QNN_ARCH_ABI x86_64-windows-msvc)
802804
endif()
@@ -815,7 +817,7 @@ if (onnxruntime_USE_QNN)
815817

816818
if (MSVC OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
817819
file(GLOB QNN_LIB_FILES LIST_DIRECTORIES false "${onnxruntime_QNN_HOME}/lib/${QNN_ARCH_ABI}/libQnn*.so" "${onnxruntime_QNN_HOME}/lib/${QNN_ARCH_ABI}/Qnn*.dll")
818-
if (${QNN_ARCH_ABI} STREQUAL "aarch64-windows-msvc")
820+
if (${QNN_ARCH_ABI} STREQUAL "aarch64-windows-msvc" OR ${QNN_ARCH_ABI} STREQUAL "arm64x-windows-msvc")
819821
file(GLOB EXTRA_HTP_LIB LIST_DIRECTORIES false "${onnxruntime_QNN_HOME}/lib/hexagon-v68/unsigned/libQnnHtpV68Skel.so"
820822
"${onnxruntime_QNN_HOME}/lib/hexagon-v73/unsigned/libQnnHtpV73Skel.so"
821823
"${onnxruntime_QNN_HOME}/lib/hexagon-v73/unsigned/libqnnhtpv73.cat")

cmake/onnxruntime_providers_tensorrt.cmake

+54-43
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,37 @@
3838
HINTS ${TENSORRT_ROOT}
3939
PATH_SUFFIXES include)
4040

41+
42+
file(READ ${TENSORRT_INCLUDE_DIR}/NvInferVersion.h NVINFER_VER_CONTENT)
43+
string(REGEX MATCH "define NV_TENSORRT_MAJOR * +([0-9]+)" NV_TENSORRT_MAJOR "${NVINFER_VER_CONTENT}")
44+
string(REGEX REPLACE "define NV_TENSORRT_MAJOR * +([0-9]+)" "\\1" NV_TENSORRT_MAJOR "${NV_TENSORRT_MAJOR}")
45+
string(REGEX MATCH "define NV_TENSORRT_MINOR * +([0-9]+)" NV_TENSORRT_MINOR "${NVINFER_VER_CONTENT}")
46+
string(REGEX REPLACE "define NV_TENSORRT_MINOR * +([0-9]+)" "\\1" NV_TENSORRT_MINOR "${NV_TENSORRT_MINOR}")
47+
string(REGEX MATCH "define NV_TENSORRT_PATCH * +([0-9]+)" NV_TENSORRT_PATCH "${NVINFER_VER_CONTENT}")
48+
string(REGEX REPLACE "define NV_TENSORRT_PATCH * +([0-9]+)" "\\1" NV_TENSORRT_PATCH "${NV_TENSORRT_PATCH}")
49+
math(EXPR NV_TENSORRT_MAJOR_INT "${NV_TENSORRT_MAJOR}")
50+
math(EXPR NV_TENSORRT_MINOR_INT "${NV_TENSORRT_MINOR}")
51+
math(EXPR NV_TENSORRT_PATCH_INT "${NV_TENSORRT_PATCH}")
52+
53+
if (NV_TENSORRT_MAJOR)
54+
MESSAGE(STATUS "NV_TENSORRT_MAJOR is ${NV_TENSORRT_MAJOR}")
55+
else()
56+
MESSAGE(STATUS "Can't find NV_TENSORRT_MAJOR macro")
57+
endif()
58+
59+
# Check TRT version >= 10.0.1.6
60+
if ((NV_TENSORRT_MAJOR_INT GREATER 10) OR
61+
(NV_TENSORRT_MAJOR_INT EQUAL 10 AND NV_TENSORRT_MINOR_INT GREATER 0) OR
62+
(NV_TENSORRT_MAJOR_INT EQUAL 10 AND NV_TENSORRT_PATCH_INT GREATER 0))
63+
set(TRT_GREATER_OR_EQUAL_TRT_10_GA ON)
64+
endif()
65+
4166
# TensorRT 10 GA onwards, the TensorRT libraries will have major version appended to the end on Windows,
4267
# for example, nvinfer_10.dll, nvinfer_plugin_10.dll, nvonnxparser_10.dll ...
43-
if (WIN32)
44-
file(READ ${TENSORRT_INCLUDE_DIR}/NvInferVersion.h NVINFER_VER_CONTENT)
45-
string(REGEX MATCH "define NV_TENSORRT_MAJOR * +([0-9]+)" NV_TENSORRT_MAJOR "${NVINFER_VER_CONTENT}")
46-
string(REGEX REPLACE "define NV_TENSORRT_MAJOR * +([0-9]+)" "\\1" NV_TENSORRT_MAJOR "${NV_TENSORRT_MAJOR}")
47-
string(REGEX MATCH "define NV_TENSORRT_MINOR * +([0-9]+)" NV_TENSORRT_MINOR "${NVINFER_VER_CONTENT}")
48-
string(REGEX REPLACE "define NV_TENSORRT_MINOR * +([0-9]+)" "\\1" NV_TENSORRT_MINOR "${NV_TENSORRT_MINOR}")
49-
string(REGEX MATCH "define NV_TENSORRT_PATCH * +([0-9]+)" NV_TENSORRT_PATCH "${NVINFER_VER_CONTENT}")
50-
string(REGEX REPLACE "define NV_TENSORRT_PATCH * +([0-9]+)" "\\1" NV_TENSORRT_PATCH "${NV_TENSORRT_PATCH}")
51-
math(EXPR NV_TENSORRT_MAJOR_INT "${NV_TENSORRT_MAJOR}")
52-
math(EXPR NV_TENSORRT_MINOR_INT "${NV_TENSORRT_MINOR}")
53-
math(EXPR NV_TENSORRT_PATCH_INT "${NV_TENSORRT_PATCH}")
54-
55-
if (NV_TENSORRT_MAJOR)
56-
MESSAGE(STATUS "NV_TENSORRT_MAJOR is ${NV_TENSORRT_MAJOR}")
57-
else()
58-
MESSAGE(STATUS "Can't find NV_TENSORRT_MAJOR macro")
59-
endif()
60-
61-
# Check TRT version >= 10.0.1.6 (Note: TRT 10 EA is 10.0.0.6 but with no major version appended to the end)
62-
if ((NV_TENSORRT_MAJOR_INT GREATER 10) OR
63-
(NV_TENSORRT_MAJOR_INT EQUAL 10 AND NV_TENSORRT_MINOR_INT GREATER 0) OR
64-
(NV_TENSORRT_MAJOR_INT EQUAL 10 AND NV_TENSORRT_PATCH_INT GREATER 0))
65-
set(NVINFER_LIB "nvinfer_${NV_TENSORRT_MAJOR}")
66-
set(NVINFER_PLUGIN_LIB "nvinfer_plugin_${NV_TENSORRT_MAJOR}")
67-
set(PARSER_LIB "nvonnxparser_${NV_TENSORRT_MAJOR}")
68-
endif()
68+
if (WIN32 AND TRT_GREATER_OR_EQUAL_TRT_10_GA)
69+
set(NVINFER_LIB "nvinfer_${NV_TENSORRT_MAJOR}")
70+
set(NVINFER_PLUGIN_LIB "nvinfer_plugin_${NV_TENSORRT_MAJOR}")
71+
set(PARSER_LIB "nvonnxparser_${NV_TENSORRT_MAJOR}")
6972
endif()
7073

7174
if (NOT NVINFER_LIB)
@@ -80,25 +83,26 @@
8083
set(PARSER_LIB "nvonnxparser")
8184
endif()
8285

83-
if (onnxruntime_USE_TENSORRT_BUILTIN_PARSER)
84-
# Add TensorRT library
85-
MESSAGE(STATUS "Search for ${NVINFER_LIB}, ${NVINFER_PLUGIN_LIB} and ${PARSER_LIB}")
86+
MESSAGE(STATUS "Looking for ${NVINFER_LIB} and ${NVINFER_PLUGIN_LIB}")
8687

87-
find_library(TENSORRT_LIBRARY_INFER ${NVINFER_LIB}
88-
HINTS ${TENSORRT_ROOT}
89-
PATH_SUFFIXES lib lib64 lib/x64)
88+
find_library(TENSORRT_LIBRARY_INFER ${NVINFER_LIB}
89+
HINTS ${TENSORRT_ROOT}
90+
PATH_SUFFIXES lib lib64 lib/x64)
9091

91-
if (NOT TENSORRT_LIBRARY_INFER)
92-
MESSAGE(STATUS "Can't find ${NVINFER_LIB}")
93-
endif()
92+
if (NOT TENSORRT_LIBRARY_INFER)
93+
MESSAGE(STATUS "Can't find ${NVINFER_LIB}")
94+
endif()
9495

95-
find_library(TENSORRT_LIBRARY_INFER_PLUGIN ${NVINFER_PLUGIN_LIB}
96-
HINTS ${TENSORRT_ROOT}
97-
PATH_SUFFIXES lib lib64 lib/x64)
96+
find_library(TENSORRT_LIBRARY_INFER_PLUGIN ${NVINFER_PLUGIN_LIB}
97+
HINTS ${TENSORRT_ROOT}
98+
PATH_SUFFIXES lib lib64 lib/x64)
9899

99-
if (NOT TENSORRT_LIBRARY_INFER_PLUGIN)
100-
MESSAGE(STATUS "Can't find ${NVINFER_PLUGIN_LIB}")
101-
endif()
100+
if (NOT TENSORRT_LIBRARY_INFER_PLUGIN)
101+
MESSAGE(STATUS "Can't find ${NVINFER_PLUGIN_LIB}")
102+
endif()
103+
104+
if (onnxruntime_USE_TENSORRT_BUILTIN_PARSER)
105+
MESSAGE(STATUS "Looking for ${PARSER_LIB}")
102106

103107
find_library(TENSORRT_LIBRARY_NVONNXPARSER ${PARSER_LIB}
104108
HINTS ${TENSORRT_ROOT}
@@ -111,6 +115,9 @@
111115
set(TENSORRT_LIBRARY ${TENSORRT_LIBRARY_INFER} ${TENSORRT_LIBRARY_INFER_PLUGIN} ${TENSORRT_LIBRARY_NVONNXPARSER})
112116
MESSAGE(STATUS "Find TensorRT libs at ${TENSORRT_LIBRARY}")
113117
else()
118+
if (TRT_GREATER_OR_EQUAL_TRT_10_GA)
119+
set(ONNX_USE_LITE_PROTO ON)
120+
endif()
114121
FetchContent_Declare(
115122
onnx_tensorrt
116123
URL ${DEP_URL_onnx_tensorrt}
@@ -132,18 +139,22 @@
132139
unset(PROTOBUF_LIBRARY)
133140
unset(OLD_CMAKE_CXX_FLAGS)
134141
unset(OLD_CMAKE_CUDA_FLAGS)
135-
set_target_properties(nvonnxparser PROPERTIES LINK_FLAGS "/ignore:4199")
142+
set_target_properties(${PARSER_LIB} PROPERTIES LINK_FLAGS "/ignore:4199")
136143
target_compile_options(nvonnxparser_static PRIVATE /FIio.h /wd4100)
137-
target_compile_options(nvonnxparser PRIVATE /FIio.h /wd4100)
144+
target_compile_options(${PARSER_LIB} PRIVATE /FIio.h /wd4100)
138145
endif()
139146
# Static libraries are just nvonnxparser_static on all platforms
140147
set(onnxparser_link_libs nvonnxparser_static)
148+
set(TENSORRT_LIBRARY ${TENSORRT_LIBRARY_INFER} ${TENSORRT_LIBRARY_INFER_PLUGIN})
149+
MESSAGE(STATUS "Find TensorRT libs at ${TENSORRT_LIBRARY}")
141150
endif()
142151

143152
include_directories(${TENSORRT_INCLUDE_DIR})
144153
# ${TENSORRT_LIBRARY} is empty if we link nvonnxparser_static.
145154
# nvonnxparser_static is linked against tensorrt libraries in onnx-tensorrt
146155
# See https://github.com/onnx/onnx-tensorrt/blob/8af13d1b106f58df1e98945a5e7c851ddb5f0791/CMakeLists.txt#L121
156+
# However, starting from TRT 10 GA, nvonnxparser_static doesn't link against tensorrt libraries.
157+
# Therefore, the above code finds ${TENSORRT_LIBRARY_INFER} and ${TENSORRT_LIBRARY_INFER_PLUGIN}.
147158
set(trt_link_libs cudnn cublas ${CMAKE_DL_LIBS} ${TENSORRT_LIBRARY})
148159

149160
file(GLOB_RECURSE onnxruntime_providers_tensorrt_cc_srcs CONFIGURE_DEPENDS

docs/ContribOperators.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -2455,10 +2455,11 @@ This version of the operator has been available since version 1 of the 'com.micr
24552455

24562456
Group Query Self/Cross Attention.
24572457

2458-
Supports different number of heads for q and kv. Only supports causal or local attention.
2459-
Supports rotary position embedding.
2460-
Supports k-v cache.
2461-
CPU EP supports fp32... CUDA EP supports fp16.
2458+
*Highly recommend using k-v cache share buffer for both CPU and CUDA. Enabled through IOBinding past and present kv.
2459+
Supports different number of heads for q and kv for CPU and CUDA.
2460+
Only supports causal and local attention.
2461+
Supports rotary position embedding for CPU and CUDA.
2462+
Supports packed input for CPU and CUDA.
24622463

24632464
#### Version
24642465

include/onnxruntime/core/session/onnxruntime_c_api.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2937,7 +2937,7 @@ struct OrtApi {
29372937
*
29382938
* Please refer to https://onnxruntime.ai/docs/execution-providers/TensorRT-ExecutionProvider.html#cc
29392939
* to know the available keys and values. Key should be in null terminated string format of the member of ::OrtTensorRTProviderOptionsV2
2940-
* and value should be its related range.
2940+
* and value should be its related range. Recreates the options and only sets the supplied values.
29412941
*
29422942
* For example, key="trt_max_workspace_size" and value="2147483648"
29432943
*
@@ -3433,7 +3433,7 @@ struct OrtApi {
34333433
*
34343434
* Please refer to https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#configuration-options
34353435
* to know the available keys and values. Key should be in null terminated string format of the member of ::OrtCUDAProviderOptionsV2
3436-
* and value should be its related range.
3436+
* and value should be its related range. Recreates the options and only sets the supplied values.
34373437
*
34383438
* For example, key="device_id" and value="0"
34393439
*

java/src/main/android/ai/onnxruntime/platform/Fp16Conversions.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
/** * Conversions between fp16, bfloat16 and fp32. */
1818
public final class Fp16Conversions {
1919
private static final Logger logger = Logger.getLogger(Fp16Conversions.class.getName());
20-
20+
21+
private Fp16Conversions() {}
22+
2123
/**
2224
* Rounds a buffer of floats into a buffer containing fp16 values (stored as shorts in Java).
2325
*

java/src/main/java/ai/onnxruntime/OrtProviderOptions.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Licensed under the MIT License.
44
*/
55
package ai.onnxruntime;
@@ -53,6 +53,13 @@ protected static long getApiHandle() {
5353
*/
5454
public abstract OrtProvider getProvider();
5555

56+
/**
57+
* Applies the Java side configuration to the native side object.
58+
*
59+
* @throws OrtException If the native call failed.
60+
*/
61+
protected abstract void applyToNative() throws OrtException;
62+
5663
/**
5764
* Is the native object closed?
5865
*

java/src/main/java/ai/onnxruntime/OrtSession.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Licensed under the MIT License.
44
*/
55
package ai.onnxruntime;
@@ -1022,6 +1022,8 @@ public void addCUDA(int deviceNum) throws OrtException {
10221022
public void addCUDA(OrtCUDAProviderOptions cudaOpts) throws OrtException {
10231023
checkClosed();
10241024
if (OnnxRuntime.extractCUDA()) {
1025+
// Cast is to make the compiler pick the right overload.
1026+
((OrtProviderOptions) cudaOpts).applyToNative();
10251027
addCUDAV2(OnnxRuntime.ortApiHandle, nativeHandle, cudaOpts.nativeHandle);
10261028
} else {
10271029
throw new OrtException(
@@ -1125,6 +1127,8 @@ public void addTensorrt(int deviceNum) throws OrtException {
11251127
public void addTensorrt(OrtTensorRTProviderOptions tensorRTOpts) throws OrtException {
11261128
checkClosed();
11271129
if (OnnxRuntime.extractTensorRT()) {
1130+
// Cast is to make the compiler pick the right overload.
1131+
((OrtProviderOptions) tensorRTOpts).applyToNative();
11281132
addTensorrtV2(OnnxRuntime.ortApiHandle, nativeHandle, tensorRTOpts.nativeHandle);
11291133
} else {
11301134
throw new OrtException(

java/src/main/java/ai/onnxruntime/providers/OrtCUDAProviderOptions.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Licensed under the MIT License.
44
*/
55
package ai.onnxruntime.providers;
@@ -41,7 +41,6 @@ public OrtCUDAProviderOptions(int deviceId) throws OrtException {
4141

4242
String id = "" + deviceId;
4343
this.options.put("device_id", id);
44-
add(getApiHandle(), this.nativeHandle, "device_id", id);
4544
}
4645

4746
@Override
@@ -59,17 +58,17 @@ public OrtProvider getProvider() {
5958
private static native long create(long apiHandle) throws OrtException;
6059

6160
/**
62-
* Adds an option to this options instance.
61+
* Adds the options to this options instance.
6362
*
6463
* @param apiHandle The api pointer.
6564
* @param nativeHandle The native options pointer.
66-
* @param key The option key.
67-
* @param value The option value.
65+
* @param keys The option keys.
66+
* @param values The option values.
6867
* @throws OrtException If the addition failed.
6968
*/
7069
@Override
71-
protected native void add(long apiHandle, long nativeHandle, String key, String value)
72-
throws OrtException;
70+
protected native void applyToNative(
71+
long apiHandle, long nativeHandle, String[] keys, String[] values) throws OrtException;
7372

7473
/**
7574
* Closes this options instance.

java/src/main/java/ai/onnxruntime/providers/OrtTensorRTProviderOptions.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Licensed under the MIT License.
44
*/
55
package ai.onnxruntime.providers;
@@ -41,7 +41,6 @@ public OrtTensorRTProviderOptions(int deviceId) throws OrtException {
4141

4242
String id = "" + deviceId;
4343
this.options.put("device_id", id);
44-
add(getApiHandle(), this.nativeHandle, "device_id", id);
4544
}
4645

4746
@Override
@@ -59,17 +58,17 @@ public OrtProvider getProvider() {
5958
private static native long create(long apiHandle) throws OrtException;
6059

6160
/**
62-
* Adds an option to this options instance.
61+
* Adds the options to this options instance.
6362
*
6463
* @param apiHandle The api pointer.
6564
* @param nativeHandle The native options pointer.
66-
* @param key The option key.
67-
* @param value The option value.
65+
* @param keys The option keys.
66+
* @param values The option values.
6867
* @throws OrtException If the addition failed.
6968
*/
7069
@Override
71-
protected native void add(long apiHandle, long nativeHandle, String key, String value)
72-
throws OrtException;
70+
protected native void applyToNative(
71+
long apiHandle, long nativeHandle, String[] keys, String[] values) throws OrtException;
7372

7473
/**
7574
* Closes this options instance.

java/src/main/java/ai/onnxruntime/providers/StringConfigProviderOptions.java

+23-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Licensed under the MIT License.
44
*/
55
package ai.onnxruntime.providers;
@@ -36,7 +36,6 @@ public void add(String key, String value) throws OrtException {
3636
Objects.requireNonNull(key, "Key must not be null");
3737
Objects.requireNonNull(value, "Value must not be null");
3838
options.put(key, value);
39-
add(getApiHandle(), nativeHandle, key, value);
4039
}
4140

4241
/**
@@ -49,7 +48,7 @@ public void add(String key, String value) throws OrtException {
4948
public void parseOptionsString(String serializedForm) throws OrtException {
5049
String[] options = serializedForm.split(";");
5150
for (String o : options) {
52-
if (!o.isEmpty() && o.contains("=")) {
51+
if (o.contains("=")) {
5352
String[] curOption = o.split("=");
5453
if ((curOption.length == 2) && !curOption[0].isEmpty() && !curOption[1].isEmpty()) {
5554
add(curOption[0], curOption[1]);
@@ -76,15 +75,31 @@ public String getOptionsString() {
7675
.collect(Collectors.joining(";", "", ";"));
7776
}
7877

78+
@Override
79+
protected void applyToNative() throws OrtException {
80+
if (!options.isEmpty()) {
81+
String[] keys = new String[options.size()];
82+
String[] values = new String[options.size()];
83+
int i = 0;
84+
for (Map.Entry<String, String> e : options.entrySet()) {
85+
keys[i] = e.getKey();
86+
values[i] = e.getValue();
87+
i++;
88+
}
89+
90+
applyToNative(getApiHandle(), this.nativeHandle, keys, values);
91+
}
92+
}
93+
7994
/**
80-
* Adds an option to this options instance.
95+
* Add all the options to this options instance.
8196
*
8297
* @param apiHandle The api pointer.
8398
* @param nativeHandle The native options pointer.
84-
* @param key The option key.
85-
* @param value The option value.
99+
* @param key The option keys.
100+
* @param value The option values.
86101
* @throws OrtException If the addition failed.
87102
*/
88-
protected abstract void add(long apiHandle, long nativeHandle, String key, String value)
89-
throws OrtException;
103+
protected abstract void applyToNative(
104+
long apiHandle, long nativeHandle, String[] key, String[] value) throws OrtException;
90105
}

java/src/main/jvm/ai/onnxruntime/platform/Fp16Conversions.java

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public final class Fp16Conversions {
5454
fp32ToFp16 = tmp32;
5555
}
5656

57+
private Fp16Conversions() {}
58+
5759
/**
5860
* Rounds a buffer of floats into a buffer containing fp16 values (stored as shorts in Java).
5961
*

0 commit comments

Comments
 (0)