Skip to content

Commit 5f80f9d

Browse files
Adjust comments
1 parent 0a84eda commit 5f80f9d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/onnxruntime/core/session/onnxruntime_cxx_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3397,7 +3397,7 @@ struct SharedPrePackedWeightCacheImpl : Ort::detail::Base<T> {
33973397
* Example use:
33983398
* OrtStatus* MyKernel::PrePackWeightImpl(OrtKernelImpl*, ..., OrtSharedPrePackedWeightCache* c_cache, ...) {
33993399
* ...
3400-
* if (cache != nullptr) {
3400+
* if (c_cache != nullptr) {
34013401
* Ort::UnownedSharedPrePackedWeightCache cpp_cache(c_cache);
34023402
* Ort::Status status = cpp_cache.StoreWeightData(...);
34033403
* }

include/onnxruntime/core/session/onnxruntime_ep_c_api.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,10 @@ struct OrtKernelImpl {
343343
* \param[in] this_ptr The OrtKernelImpl instance.
344344
* \param[in] tensor The OrtValue instance representing the constant tensor (weight). Do not cache in the kernel.
345345
* \param[in] input_index The input index of the tensor in this kernel.
346-
* \param[in] allocator Implementation must use this allocator for allocating the packed data in sharing and
347-
* non-sharing modes. This will be an allocator set on the OrtEpDevice (read-only or default)
348-
* or an allocator set for the session or ORT environment via APIs such as
349-
* CreateAndRegisterAllocator, CreateAndRegisterAllocatorV2, or RegisterAllocator.
346+
* \param[in] allocator Allocator for allocating the pre-packed data. Its use is required in sharing mode and
347+
* recommended in the non-sharing mode. This will be an allocator set on the OrtEpDevice
348+
* (read-only or default) or an allocator set for the session or ORT environment via APIs
349+
* such as CreateAndRegisterAllocator, CreateAndRegisterAllocatorV2, or RegisterAllocator.
350350
* The allocator remains valid throughout the lifetime of the OrtKernelImpl instance.
351351
* \param[in] prepacked_weights_cache May be NULL. If not NULL, the kernel may choose to share a packed weight by
352352
* first storing it in the OrtSharedPrePackedWeightCache instance and then

0 commit comments

Comments
 (0)