Skip to content

Commit

Permalink
exclude from minimal
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyShuai committed Jan 11, 2024
1 parent fd6bab4 commit 57568bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions onnxruntime/core/session/custom_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ ORT_API_STATUS_IMPL(OrtApis::KernelContext_GetResource, _In_ const OrtKernelCont

ORT_API_STATUS_IMPL(OrtApis::KernelContext_ParallelFor, _In_ const OrtKernelContext* context, _In_ void (*fn)(void*, size_t), _In_ size_t total, _In_ size_t num_batch, _In_ void* usr_data) {
API_IMPL_BEGIN
#if !defined(ORT_MINIMAL_BUILD) || defined(ORT_MINIMAL_BUILD_CUSTOM_OPS)
if (!context) {
return OrtApis::CreateStatus(ORT_RUNTIME_EXCEPTION, "Invalid context");
}
Expand All @@ -403,6 +404,9 @@ ORT_API_STATUS_IMPL(OrtApis::KernelContext_ParallelFor, _In_ const OrtKernelCont
}
}
return nullptr;
#else
return OrtApis::CreateStatus(ORT_NOT_IMPLEMENTED, "ParallelFor API not implemented for this build");
#endif
API_IMPL_END
};

Expand Down

0 comments on commit 57568bb

Please sign in to comment.