constchar*(ORT_API_CALL*GetVersionString)(void)NO_EXCEPTION;///< Returns a null terminated string of the version of the Onnxruntime library (eg: "1.8.1")
};
typedefstructOrtApiBaseOrtApiBase;
/** \brief The Onnxruntime library's entry point to access the C API
*
* Call this to get the a pointer to an ::OrtApiBase
ORT_CLASS_RELEASE(Session);// Don't call ReleaseSession from Dllmain (because session owns a thread pool)
/// @}
/// \name OrtValue
/// @{
ORT_CLASS_RELEASE(Value);
/// @}
/// \name OrtRunOptions
/// @{
ORT_CLASS_RELEASE(RunOptions);
/// @}
/// \name OrtTypeInfo
/// @{
ORT_CLASS_RELEASE(TypeInfo);
/// @}
/// \name OrtTensorTypeAndShapeInfo
/// @{
ORT_CLASS_RELEASE(TensorTypeAndShapeInfo);
/// @}
/// \name OrtSessionOptions
/// @{
ORT_CLASS_RELEASE(SessionOptions);
/// @}
/// \name OrtCustomOpDomain
/// @{
ORT_CLASS_RELEASE(CustomOpDomain);
/// @}
/// \name OrtTypeInfo
/// @{
/** \brief Get denotation from type information
*
* Augments ::OrtTypeInfo to return denotations on the type.
*
* This is used by WinML to determine if an input/output is intended to be an Image or a Tensor.
*
* \param[in] type_info
* \param[out] denotation Pointer to the null terminated denotation string is written to this pointer. This pointer is valid until the object is destroyed or the name is changed, do not free.
* \param[out] len Length in bytes of the string returned in `denotation`
*
* \snippet{doc} snippets.dox OrtStatus Return Value
/** \brief Append TensorRT provider to session options
*
* If TensorRT is not available (due to a non TensorRT enabled build, or if TensorRT is not installed on the system), this function will return failure.
*
* \param[in] options
* \param[in] tensorrt_options
*
* \snippet{doc} snippets.dox OrtStatus Return Value
/** \brief Release an ::OrtTensorRTProviderOptionsV2
*
* \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does
* \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does
/** \brief Append MIGraphX provider to session options
*
* If MIGraphX is not available (due to a non MIGraphX enabled build, or if MIGraphX is not installed on the system), this function will return failure.
*
* \param[in] options
* \param[in] migraphx_options
*
* \snippet{doc} snippets.dox OrtStatus Return Value
* Semicolon isolates configurations among threads, while comma split processors where ith thread expected to attach to.
* e.g. 1,2,3;4,5
* specifies affinities for two threads, with the 1st thread attach to the 1st, 2nd, and 3rd processor, and 2nd thread to the 4th and 5th.
* To ease the configuration, an "interval" is also allowed:
* e.g. 1-8;8-16;17-24
* orders that the 1st thread runs on first eight processors, 2nd thread runs on next eight processors, and so forth.
* Note:
* 1. Once set, the number of thread affinities must equal to intra_op_num_threads - 1,
* ort does not set affinity on the main thread which is started and managed by the calling app;
* 2. For windows, ort will infer the group id from a logical processor id, for example, assuming there are two groups with each has 64 logical processors,
* an id of 64 will be inferred as the last processor of the 1st group, while 65 will be interpreted as the 1st processor of the second group.
* Hence 64-65 is an invalid configuration, because a windows thread cannot be attached to processors across group boundary.
* This is the old way to add the CUDA provider to the session, please use SessionOptionsAppendExecutionProvider_CUDA above to access the latest functionality
* This function always exists, but will only succeed if Onnxruntime was built with CUDA support and the CUDA provider shared library exists
*
* \param device_id CUDA device id, starts from zero.
static_assert(sizeof(BFloat16_t)==sizeof(uint16_t),"Sizes must match");
namespacedetail{
// This is used internally by the C++ API. This macro is to make it easy to generate overloaded methods for all of the various OrtRelease* functions for every Ort* type
// This can't be done in the C API since C doesn't have function overloading.
// Semicolon isolates configurations among threads, while comma split processors where ith thread expected to attach to.
// e.g.1,2,3;4,5
// specifies affinities for two threads, with the 1st thread attach to the 1st, 2nd, and 3rd processor, and 2nd thread to the 4th and 5th.
// To ease the configuration, an "interval" is also allowed:
// e.g. 1-8;8-16;17-24
// orders that the 1st thread runs on first eight processors, 2nd thread runs on next eight processors, and so forth.
// Note:
// 1. Once set, the number of thread affinities must equal to intra_op_num_threads - 1, since ort does not set affinity on the main thread which
// is started and managed by the calling app;
// 2. For windows, ort will infer the group id from a logical processor id, for example, assuming there are two groups with each has 64 logical processors,
// an id of 64 will be inferred as the last processor of the 1st group, while 65 will be interpreted as the 1st processor of the second group.
// Hence 64-65 is an invalid configuration, because a windows thread cannot be attached to processors across group boundary.