Skip to content

Commit 5bfc8eb

Browse files
author
wejoncy
committed
pass static anaysis
1 parent 590a80c commit 5bfc8eb

File tree

1 file changed

+2
-0
lines changed
  • onnxruntime/core/providers/coreml/model

1 file changed

+2
-0
lines changed

onnxruntime/core/providers/coreml/model/model.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ Status GetMLMultiArrayCopyInfo(const MLMultiArray* _Nonnull array,
306306
// we define __clang_analyzer__ here is for bypass static analysis
307307
API_AVAILABLE(macos(14.4), ios(17.4), tvos(17.4), watchos(10.4))
308308
void ProfileBlock(MLComputePlan* _Nullable computePlan, MLModelStructureProgramBlock* block) {
309+
#if !defined(__clang_analyzer__)
309310
for (MLModelStructureProgramOperation* operation in block.operations) {
310311
for (size_t i = 0; i < operation.blocks.count; ++i) {
311312
ProfileBlock(computePlan, operation.blocks[i]);
@@ -319,6 +320,7 @@ void ProfileBlock(MLComputePlan* _Nullable computePlan, MLModelStructureProgramB
319320
NSLog(@"Operation: %@, Device Usage: %@, Estimated Cost: %f", operation.operatorName, preferredDevice, estimatedCost.weight);
320321
}
321322
}
323+
#endif
322324
}
323325
// since macos(14.4), ios(17.4), MLComputePlan is introduced in <CoreML/CoreML.h>
324326
// Otherwise, the compiler will complain `MLComputePlan` is not defined.

0 commit comments

Comments
 (0)