*** hashtable: count differs after rehashing; probably indicates a broken invariant: there are x and y such as isEqual(x, y) is TRUE but hash(x) != hash (y)
*** NXCreateMapTable: invalid creation parameters
*** NXMapInsert: invalid key: -1
**** NXMapInsert: bug
**** NXMapRemove: incorrect table
**** NXMapRemove: bug
*** maptable: count differs after rehashing; probably indicates a broken invariant: there are x and y such as isEqual(x, y) is TRUE but hash(x) != hash (y)
CACHES: %sclass %s: dropping cache (from %s)
setInitialized
CACHES: new empty buckets at %p (capacity %zu)
Method cache corrupted. This may be a message to an invalid object, or a memory error somewhere else.
%s %p, SEL %p, isa %p, cache %p, buckets and mask 0x%lx, occupied 0x%x
receiver
unused
%s %zu bytes, buckets %zu bytes
selector '%s'
isa '%s'
cache_t::insert() called with a preoptimized cache for %s
CACHES: %sclass %s: dropping and disallowing preopt cache (from %s)
task_restartable_ranges_register failed (result 0x%x: %s)
CACHES: not collecting; objc_msgSend in progress
CACHES: COLLECTING %zu bytes (%zu allocations, %zu collections)
CACHES: %4d slots: %4d caches, %6zu bytes
CACHES: total: %4zu caches, %6zu bytes
task_restartable_ranges_synchronize failed (result 0x%x: %s)
task_threads failed (result 0x%x)
CXX: calling C++ constructors for class %s
class_respondsToMethod
class_lookupMethod
invalid selector (null)
__objc_dupclass
Class %s is implemented in both %s (%p) and %s (%p). One of the two will be used. Which one is undefined.
"%s"%s,
Incorrect buffer calculation for property string. Partial string is %s, calculated length is %zu.
CXX: calling C++ destructors for class %s
objc[%d]: %s
The function %s is obsolete. Do not use it. Set a breakpoint on _objc_warn_deprecated to find the culprit.
objc[%d]: HALTED
network-outbound
/private/var/run/syslog
... %s
unexpected call into objc exception typeinfo vtable %d
EXCEPTIONS: %s through frame [ip=%p sp=%p] for exception %p
unwinding
searching
EXCEPTIONS: throwing %p (object %p, a %s)
EXCEPTIONS: rethrowing current exception
EXCEPTIONS: handling exception %p at %p
EXCEPTIONS: finishing handler
EXCEPTIONS: skipping catch(?)
EXCEPTIONS: catch(id)
EXCEPTIONS: catch(%s)
EXCEPTIONS: skipping catch(%s)
EXCEPTIONS: releasing completed exception %p (object %p, a %s)
EXCEPTIONS: terminating
__objc_selrefs
__objc_msgrefs
__objc_classrefs
__objc_superrefs
__objc_classlist
__objc_stublist
__objc_nlclslist
__objc_catlist
__objc_catlist2
__objc_nlcatlist
__objc_protolist
__objc_protorefs
__objc_init_func
__objc_init_offs
__objc_imageinfo
INITIALIZE: thread %p: blocking until +[%s initialize] completes
INITIALIZE: thread %p: skipping trivial +[%s initialize] in fork() child process
INITIALIZE: thread %p: refusing to call +[%s initialize] in fork() child process because it may have been in progress when fork() was called
+[%s initialize] may have been in progress in another thread when fork() was called.
+[%s initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
INITIALIZE: thread %p: calling +[%s initialize]
INITIALIZE: thread %p: finished +[%s initialize]
INITIALIZE: thread %p: +[%s initialize] threw an exception
thread-safe class init in objc runtime is buggy!
INITIALIZE: thread %p: %s is fully +initialized
thread is not initializing this class!
INITIALIZE: thread %p: class %s will be marked as fully +initialized after superclass +[%s initialize] completes
thread is already initializing this class!
LOAD: class '%s' scheduled for +load
LOAD: category '%s(%s)' scheduled for +load
LOAD: class '%s' unscheduled for +load
LOAD: category '%s(%s)' unscheduled for +load
LOAD: +[%s load]
LOAD: +[%s(%s) load]
LOAD: %d categories still waiting for +load
Swift requested that class %p be ignored, but libobjc does not support that.
FUTURE: found %p already in use for %s
_objc_flush_caches
B16@?0#8
class_rx signing mismatch
class_ro_t enforcement disabled
the image may contain classes with missing weak superclasses
there are unresolved future classes pending
PREOPTIMIZATION: reading classes manually from %s because %s
CLASS: found %d classes during launch
IMAGE TIMES: first time tasks
IMAGE TIMES: fix up selector references
IMAGE TIMES: discover classes
IMAGE TIMES: remap classes
PROTOCOLS: Skipping reading protocols in image: %s
IMAGE TIMES: discover protocols
IMAGE TIMES: fix up @protocol references
IMAGE TIMES: discover categories
Swift class %s with a metadata initializer is not allowed to be non-lazy
IMAGE TIMES: realize non-lazy classes
Swift class is not allowed to be future
IMAGE TIMES: realize future classes
PREOPTIMIZATION: honoring preoptimized selectors in %s
PREOPTIMIZATION: IGNORING preoptimized selectors in %s
PREOPTIMIZATION: %zu selector references not pre-optimized
PREOPTIMIZATION: %u/%u (%.3g%%) method lists pre-sorted
PREOPTIMIZATION: %u/%u (%.3g%%) classes pre-registered
PREOPTIMIZATION: %zu protocol references not pre-optimized
Swift class extensions and categories on Swift classes are not allowed to have +load methods
method_exchangeImplementations
objc_registerProtocol: protocol '%s' was already registered!
objc_registerProtocol: protocol '%s' was not allocated with objc_allocateProtocol!
protocol_addProtocol: modified protocol '%s' is not under construction!
protocol_addProtocol: added protocol '%s' is still under construction!
protocol_addMethodDescription: protocol '%s' is not under construction!
protocol_addProperty: protocol '%s' is not under construction!
unable to find caller's image
unable to find mach header for image
<stub class %p>
<lazily named class %p>
Memory corruption in class list.
INITIALIZE: thread %p: setInitialized(%s)
RAW ISA: %s%s%s
(meta)
(inherited)
Lazily named class %p with no lazy name handler registered
Lazily named class %p wasn't named by lazy name handler
*** Can't set ivar layout for already-registered class '%s'
*** Can't set weak ivar layout for already-registered class '%s'
CLASS: realizing class '%s' (duplicate of %s) %p %p
objc_registerClassPair: class '%s' was already registered!
objc_registerClassPair: class '%s' was not allocated with objc_allocateClassPair!
objc_readClassPair for class %s changed %p to %p
objc_disposeClassPair: class '%s' was not allocated with objc_allocateClassPair!
objc_disposeClassPair: class '%s' is a metaclass, not a class!
objc_disposeClassPair: class '%s' still has subclasses, including '%s'!
tagged pointers are disabled
tag index %u is invalid
tag index %u used for two different classes (was %p %s, now %p %s)
Cannot assign to small method %p from method %p
INITIALIZE: %d/%d (%g%%) successful by-name metaclass lookups
INITIALIZE: %d/%d (%g%%) successful secondary metaclass lookups
INITIALIZE: %d/%d (%g%%) successful shared cache metaclass lookups
INITIALIZE: %d/%d (%g%%) successful dyld closure metaclass lookups
no class for metaclass %p
FUTURE: using %p instead of %p for %s
CLASS: realizing class '%s'%s %p %p #%u %s%s
(swift)
(pre-stable swift)
OS_object
NSConstantString
NSSimpleCString
IVARS: DEBUG: forcing ivars for class '%s' to slide (instanceStart %zu -> %zu)
IVARS: sliding ivars for class %s (superclass was %u bytes, now %u)
IVARS: offset %u -> %u for %s (size %u, align %u)
CLASS: methodizing class '%s' %s
(meta)
Cannot sort small method list %p
CUSTOM AWZ
CUSTOM RR
CUSTOM Core
%s: %s%s%s
CLASS: attaching %d categories to%s class '%s'%s
existing
attachCategories
FUTURE: reserving %p for %s
rootdev
CLASS: IGNORING class '%s' with missing weak-linked superclass
Can't complete future class request for '%s' because the real class is too big.
%.2f ms: %s
PROTOCOLS: protocol at %p is %s (duplicate of %p)
PROTOCOLS: protocol at %p is %s
CLASS: IGNORING category ???(%s) %p with missing weak-linked target class
CLASS: found category %c%s(%s)
_method_setImplementation
%.*s.%.*s
_Tt%cs%zu%.*s%s
_Tt%c%zu%.*s%zu%.*s%s
CLASS: calling Swift metadata initializer for class '%s' (%p)
Attempt to use unknown class %p.
RESOLVE: method %c[%s %s] dynamically resolved to %p
RESOLVE: +[%s resolveInstanceMethod:%s] returned YES, but no new implementation of %c[%s %s] was found
nonmeta class %s (%p) unexpectedly not realized
RESOLVE: +[%s resolveClassMethod:%s] returned YES, but no new implementation of %c[%s %s] was found
CACHES: %sclass %s: disallow preopt cache (from %s)
CACHES: %sclass %s: disallow sel-inlined preopt cache (from %s)
addMethods_finish
addSubclass
setSuperclass
_TtCs12_SwiftObject
link error: class '%s' not found.
class `%s' not linked into application
Cannot find range %#lx..%#lx
classRxSigning
classRoSigningFaults
Malloc
NSZombiesEnabled
OBJC_HELP=
OBJC_PRINT_OPTIONS=
OBJC_DEBUG_POOL_DEPTH=
DYLD_INSERT_LIBRARIES
OBJC_DEBUG_POOL_ALLOCATION
MallocStackLogging
MallocStackLoggingNoCompact
libgmalloc
preoptimizedCaches
Objective-C runtime debugging. Set variable=YES to enable.
OBJC_HELP: describe available environment variables
OBJC_HELP is set
OBJC_PRINT_OPTIONS: list which options are set
OBJC_PRINT_OPTIONS is set
%s: %s
%s is set
%s is fatal
REPLACED: %c[%s %s] %s%s (IMP was %p (%s), now %p (%s))
by category
%c[%s %s]: unrecognized selector sent to instance %p (no message forward handler is installed)
mutation detected during 'for(... in ...)' enumeration of object %p.
OBJC_PRINT_IMAGES
log image and library names as they are loaded
OBJC_PRINT_IMAGE_TIMES
measure duration of image loading steps
OBJC_PRINT_LOAD_METHODS
log calls to class and category +load methods
OBJC_PRINT_INITIALIZE_METHODS
log calls to class +initialize methods
OBJC_PRINT_RESOLVED_METHODS
log methods created by +resolveClassMethod: and +resolveInstanceMethod:
OBJC_PRINT_CLASS_SETUP
log progress of class and category setup
OBJC_PRINT_PROTOCOL_SETUP
log progress of protocol setup
OBJC_PRINT_IVAR_SETUP
log processing of non-fragile ivars
OBJC_PRINT_VTABLE_SETUP
log processing of class vtables
OBJC_PRINT_VTABLE_IMAGES
print vtable images showing overridden methods
OBJC_PRINT_CACHE_SETUP
log processing of method caches
OBJC_PRINT_FUTURE_CLASSES
log use of future classes for toll-free bridging
OBJC_PRINT_PREOPTIMIZATION
log preoptimization courtesy of dyld shared cache
OBJC_PRINT_CXX_CTORS
log calls to C++ ctors and dtors for instance variables
OBJC_PRINT_EXCEPTIONS
log exception handling
OBJC_PRINT_EXCEPTION_THROW
log backtrace of every objc_exception_throw()
OBJC_PRINT_ALT_HANDLERS
log processing of exception alt handlers
OBJC_PRINT_REPLACED_METHODS
log methods replaced by category implementations
OBJC_PRINT_DEPRECATION_WARNINGS
warn about calls to deprecated runtime functions
OBJC_PRINT_POOL_HIGHWATER
log high-water marks for autorelease pools
OBJC_PRINT_CUSTOM_CORE
log classes with custom core methods
OBJC_PRINT_CUSTOM_RR
log classes with custom retain/release methods
OBJC_PRINT_CUSTOM_AWZ
log classes with custom allocWithZone methods
OBJC_PRINT_RAW_ISA
log classes that require raw pointer isa fields
OBJC_DEBUG_UNLOAD
warn about poorly-behaving bundles when unloaded
OBJC_DEBUG_FRAGILE_SUPERCLASSES
warn about subclasses that may have been broken by subsequent changes to superclasses
OBJC_DEBUG_NIL_SYNC
warn about @synchronized(nil), which does no synchronization
OBJC_DEBUG_NONFRAGILE_IVARS
capriciously rearrange non-fragile ivars
OBJC_DEBUG_ALT_HANDLERS
record more info about bad alt handler use
OBJC_DEBUG_MISSING_POOLS
warn about autorelease with no pool in place, which may be a leak
halt when autorelease pools are popped out of order, and allow heap debuggers to track autorelease pools
OBJC_DEBUG_DUPLICATE_CLASSES
warn when multiple classes with the same name are present
OBJC_DEBUG_DONT_CRASH
halt the process by exiting instead of crashing
OBJC_DEBUG_POOL_DEPTH
log fault when at least a set number of autorelease pages has been allocated
OBJC_DEBUG_SCRIBBLE_CACHES
scribble the IMPs in freed method caches
OBJC_DEBUG_SCAN_WEAK_TABLES
scan the weak references table continuously in the background - set OBJC_DEBUG_SCAN_WEAK_TABLES_INTERVAL_NANOSECONDS to set scanning interval (default 1000000)
OBJC_DISABLE_VTABLES
disable vtable dispatch
OBJC_DISABLE_PREOPTIMIZATION
disable preoptimization courtesy of dyld shared cache
OBJC_DISABLE_TAGGED_POINTERS
disable tagged pointer optimization of NSNumber et al.
OBJC_DISABLE_TAG_OBFUSCATION
disable obfuscation of tagged pointers
OBJC_DISABLE_NONPOINTER_ISA
disable non-pointer isa fields
OBJC_DISABLE_INITIALIZE_FORK_SAFETY
disable safety checks for +initialize after fork
OBJC_DISABLE_FAULTS
disable os faults
OBJC_DISABLE_PREOPTIMIZED_CACHES
disable preoptimized caches
OBJC_DISABLE_AUTORELEASE_COALESCING
disable coalescing of autorelease pool pointers
OBJC_DISABLE_AUTORELEASE_COALESCING_LRU
disable coalescing of autorelease pool pointers using look back N strategy
OBJC_DISABLE_CLASSRX_SIGNING_ENFORCEMENT
disable class_rx_t pointer signing enforcement
OBJC_DEBUG_CLASS_RX_SIGNING
warn about class_rx_t pointer signing mismatches
OBJC_DISABLE_CLASS_RO_FAULTS
disable os faults for class_ro_t pointer signing mismatches
PREOPTIMIZATION: using dyld selector opt
.cxx_construct
.cxx_destruct
<null selector>
NIL SYNC DEBUG: @synchronized(nil); set a breakpoint on objc_sync_nil to debug
@synchronized(nil) is fatal
id2data fastcache is buggy
id2data cache is buggy
id2data is buggy
Object: SubtypeUntil: end of type encountered prematurely
Protocol
objc_setAssociatedObject called on instance (%p) of class %s which does not allow associated objects
IMAGES: processing %u newly-mapped images...
IMAGES: loading image for %s%s%s%s%s
(bundle)
(replacement)
(has class properties)
(preoptimized)
%s has un-signed class_ro_t pointers, but the main executable was compiled with class_ro_t pointer signing enabled
IMAGES: processing 1 newly-unmapped image...
IMAGES: unloading image for %s%s%s
PREOPTIMIZATION: honoring preoptimized header info at %p for %s
__OBJC
CLASS: patching class '%s' (%p) to point to body of %p
__DATA
__DATA_CONST
__DATA_DIRTY
__AUTH
vm_allocate trampolines failed (%d)
vm_remap trampolines failed (%d)
Trampoline block %p, requested invalid index %lu
/usr/lib/libobjc-trampolines.dylib
couldn't dlopen libobjc-trampolines.dylib: %s
__TEXT
_objc_blockTrampoline
couldn't dlsym %s
Cannot form weak reference to instance (%p) of class %s. It is possible that this object was over-released, or is in the process of deallocation.
__weak variable at %p holds %p instead of %p. This is probably incorrect use of objc_storeWeak() and objc_loadWeak(). Break on objc_weak_error to debug.
bad weak table at %p. This may be a runtime bug or a memory error somewhere else.
Attempted to unregister unknown __weak variable at %p. This is probably incorrect use of objc_storeWeak() and objc_loadWeak(). Break on objc_weak_error to debug.
_objc_rootFinalize called with garbage collection off
+[%s %s]: unrecognized selector sent to instance %p
-[%s %s]: unrecognized selector sent to instance %p
+[NSObject instanceMethodSignatureForSelector:] not available without CoreFoundation
+[NSObject methodSignatureForSelector:] not available without CoreFoundation
-[NSObject methodSignatureForSelector:] not available without CoreFoundation
attempt to allocate object of class '%s' failed
/usr/lib/swift/libswiftCore.dylib
swift_retain
swift_release
autorelease pool page %p corrupted
magic 0x%08x 0x%08x 0x%08x 0x%08x
should be 0x%08x 0x%08x 0x%08x 0x%08x
pthread %p
should be %p
AUTORELEASE!
com.apple.obj-c
Large Autorelease Pool
MISSING POOLS: (%p) Object %p of class %s autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Missing pools are a fatal error
Invalid or prematurely-freed autorelease pool %p. Set a breakpoint on objc_autoreleasePoolInvalid to debug.
Proceeding anyway. Memory errors are likely.
Invalid autorelease pools are a fatal error
POOL HIGHWATER: new high water mark of %u pending releases for thread %p:
POOL HIGHWATER: extra sequential autoreleases of objects: %u
POOL HIGHWATER: %s
##############
AUTORELEASE POOLS for thread %p
%llu releases pending.
[%p] ................ PAGE (placeholder)
[%p] ################ POOL (placeholder)
[%p] ................ PAGE %s %s %s
(full)
(cold)
[%p] ################ POOL %p
[%p] %#16lx %s autorelease count %u
[%p] %#16lx %s
Starting background scan of weak references.
pthread_create failed with error %d (%s)
ObjC weak reference scanner
OBJC_DEBUG_SCAN_WEAK_TABLES_INTERVAL_NANOSECONDS
Weak reference at %p contains %p, should contain %p
Hash table corrupted. This is probably a memory error somewhere. (table at %p, buckets at %p (%zu bytes), %u buckets, %u entries, %u tombstones, data %p %p %p %p)
v28@?0^v8B16^B20
preoptimized header_info missing for %s (%p %p %p)
(by OBJC_DISABLE_PREOPTIMIZATION)
bad objc preopt version (want %d, got %d)
(dyld shared cache is absent or out of date)
PREOPTIMIZATION: is DISABLED %s
PREOPTIMIZATION: is ENABLED (version %d)
-[MPSGraphMatrixDecompositionOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphMatrixDecompositionOps.mm
-[MPSGraph(MPSGraphMatrixDecompositionOps) decompositionWithTensor:descriptor:name:]
MPSGraphMatrixDecompositionOps.mm
(desc.decompositionType == MPSGraphMatrixDecompositionLU) && "unsupported decomposition type"
Twine.h
isValid() && "Invalid twine!"
Location
Location.h
loc && "location should never be null."
basic_string
mps.matrix_decomposition_lu
vector
create
Builders.h
result && "builder didn't return the right type"
Building op `
` but it isn't registered in this MLIRContext: the dialect may not be loaded or this operation isn't registered by the dialect. See also https://mlir.llvm.org/getting_started/Faq/#registered-loaded-dependent-whats-up-with-dialects-management
Optional.h
hasVal
classof on '
' failed due to the operation not being registered
constant_val
Could not find parameter with name 'pad'.
Unexpected argument size for 'pad'
Couldn't get value for parameter: "pad"
constant
reflect
matchAndRewrite
MILToMLIRCustomPatterns.mm
0 && "Unknown padding mode"
The number of outputs does not match the number of results.
crop_height
Could not find parameter with name 'crop_height'.
Unexpected argument size for 'crop_height'
crop_width
Could not find parameter with name 'crop_width'.
Unexpected argument size for 'crop_width'
Unexpected length for 'crop_height'
Unexpected length for 'crop_width'
align_corners
Could not find parameter with name 'align_corners'.
Unexpected argument size for 'align_corners'
upsample_bilinear rank < 2 not supported.
upsample_bilinear rank > 4 not supported.
scale_factor_height
unexpected type for scale_factor_height
scale_factor_width
unexpected type for scale_factor_width
half_pixel_centers
resize_bilinear
sampling_mode
Could not find parameter with name 'sampling_mode'.
Unexpected argument size for 'sampling_mode'
Unexpected value for 'sampling_mode'
OFFSET_CORNERS not yet supported in resize_bilinear
resize_bilinear rank < 2 not supported.
resize_bilinear rank > 4 not supported.
Unsupported rank for input tensor.
target_size_height
unexpected type for target_size_height
target_size_width
unexpected type for target_size_width
upsample_nearest_neighbor
unexpected type for axis
num_splits
split_sizes
Invalid axis
Input shape must be constant along 'axis'.
Input shape must be divisible by 'num_splits' along 'axis'.
Either 'num_splits' or a 'split_sizes' tensor must be provided.
Expected num_splits tensor outputs.
Unexpected number of tuple values.
Expected tuple with num_splits tensor values.
Return types of split must be either a tuple with num_splits tensor values, or num_splits distinct tensor values.
values
inverse
epsilon
range_1d
random_uniform
random_bernoulli
random_normal
unexpected type for mean
stddev
unexpected type for stddev
reverse
flatten2d
ascending
Expected values tensor output.
Return types of topk must be 2 distinct tensor values.
crop_resize
target_height
target_width
normalized_coordinates
spatial_scale
Failed to materialize constant: value is not a tensor.
Unexpected MIL element type.
box_coordinate_mode
0 && "Unknown coordinate mode"
source_val
output_dtype
ios16.constexpr_affine_dequantize
quantized_data
zero_point
reshape_like
ref_tensors
begins
end_masks
Invalid `begins` value.
Invalid `ends` value.
Unknown quantization variant.
Unsupported operation.
conv_transpose
weight
groups
Unexpectedly small rank for 'x'
pad_type
Could not find parameter with name 'pad_type'.
Unexpected argument size for 'pad_type'
matchAndRewriteConv
0 && "Unknown padding style"
Only up to rank 2 convolutions supported currently.
strides
dilations
output_shape
1d, 2d convolutions supported currently.
Invalid output shape.
resultShape.size() == 4 && resultShape[0] == xShape[0] * xShape[batchLikeDimIndex]
Unsupported conv3d configuration.
Unknown convolution dimension.
Attributes.h
isa<U>()
impl && "isa<> used on a null attribute."
mps.permute
mps.expand_dims
mps.depthwise_conv_3d
set_size
SmallVector.h
N <= capacity()
mps.conv_2d
mps.bias_add
assertSafeToReferenceAfterResize
isSafeToReferenceAfterResize(Elt, NewSize) && "Attempting to reference an element of the vector in an operation " "that invalidates it"
operator[]
idx < size()
mps.depthwise_conv_3d_data_gradient
mps.conv_2d_data_gradient
mps.add
mps.transpose
mps.matmul
this->isReferenceToStorage(CI) && "Iterator to erase is out of bounds."
Types.h
impl && "isa<> used on a null type."
getAbstractType
TypeSupport.h
abstractType && "Malformed type storage object."
llvm::StringRef llvm::getTypeName() [DesiredTypeName = mlir::ShapedType]
DesiredTypeName =
getTypeName
TypeName.h
!Name.empty() && "Unable to find the template parameter!"
Name.endswith("]") && "Name doesn't end in the substitution key!"
drop_front
StringRef.h
size() >= N && "Dropping more elements than exist"
Interface
InterfaceSupport.h
(!t || impl) && "expected value to provide interface instance"
ArrayRef.h
Index < Length && "Invalid index!"
index out of bounds
mps.constant
getAbstractAttribute
AttributeSupport.h
abstractAttribute && "Malformed attribute storage object."
llvm::StringRef llvm::getTypeName() [DesiredTypeName = mlir::ElementsAttr]
mps.squeeze
mps.flatten_2d
mps.reshape
unexpected element type kind
../mlir-mps/include/mlir-mps/Dialect/MPS/IR/MPSOps.h
mps.pad
mps.crop
mps.resize
mps.slice
mps.concat
mps.reciprocal
mps.logarithm
mps.reverse_square_root
mps.subtract
mps.divide
mps.ceil
mps.cast
mps.get_coordinates
mps.multiply
mps.init_random_philox_state
mps.random_uniform
mps.less
mps.select
mps.random_normal
mps.reverse
mps.top_k
mps.crop_resize
mps.dequantize
_inferJITOutputTypes
GPUBaseOps.mm
0 && "failed to infer output types"
0 && "invalid operation"
clonedOp->getNumResults() == _op->getNumResults()
0 && "Output type inferred by JIT doesn't match with original static output type"
Unsupported dataType
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUBaseOps.mm
getOperandStorage
Operation.h
hasOperandStorage && "expected operation to have operand storage"
Static type not set for `
of type `
getStaticType
MPSRuntime_Project.h
0 && "value has no static type"
isStaticMPSType(ty)
Matchers.h
succeeded(result) && "expected ConstantLike op to be foldable"
PointerUnion.h
isa<T>(*this) && "Invalid accessor called"
llvm::StringRef llvm::getTypeName() [DesiredTypeName = mlir::OpTrait::ConstantLike<Empty>]
!empty()
initEmpty
DenseMap.h
(getNumBuckets() & (getNumBuckets()-1)) == 0 && "# initial buckets must be a power of two!"
Index < this->size() && "Invalid index!"
LookupBucketFor
!KeyInfoT::isEqual(Val, EmptyKey) && !KeyInfoT::isEqual(Val, TombstoneKey) && "Empty/Tombstone value shouldn't be inserted into map!"
InsertIntoBucketImpl
TheBucket
moveFromOldBuckets
!FoundVal && "Key already in new map?"
setStaticJITypeForValue
!isStaticMPSType(value.getType())
isStaticMPSType(type)
opMap.count(value.getAsOpaquePointer()) == 0 && "type already computed"
Op does not handle stitching
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Headers/MPSRuntime_Project.h
mps.placeholder
all ndarrays should have been allocated
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUDepthwiseConvOps.mm
DepthwiseConv2D can't be stitched
DepthwiseConv2DDataGradient can't be stitched
DepthwiseConv2DWeightsGradient can't be stitched
DepthwiseConv3DDataGradient can't be stitched
DepthwiseConv3DWeightsGradient can't be stitched
Casting.h
isa<To>(Val) && "cast<Ty>() argument of incompatible type!"
mps.depthwise_conv_2d
Input Rank should be 4 or more for depthwise convolution
Image data layout not supported
permuteImage
GPUDepthwiseConvOps.mm
transSource
transDest
Weight data layout not supported
permuteWeights
transWeights || aliasing==MPSAliasingStrategyShallAlias
transWeights
mps.depthwise_conv_2d_data_gradient
mps.depthwise_conv_2d_weights_gradient
permuteWeightsBack
mps.depthwise_conv_3d_weights_gradient
stride != 1 not supported for dim 3
stride != 1 not supported for dim 2
stride num dimensions should be <= 4
dilationRate != 1 not supported for dim 3
dilationRate != 1 not supported for dim 2
dilationRate num dimensions should be <= 4
stride != 1 not supported for dim 0
dilationRate != 1 not supported for dim 0
createDepthwiseConv2D
0 && "Unsupported dataLayout"
0 && "Unsupported weightsFormat"
Source and weight input channels mismatch
0 && "Unsupported paddingStyle"
getZExtValue
APInt.h
getActiveBits() <= 64 && "Too many bits for uint64_t"
createDepthwiseConv3D
0 && "Unknown paddingStyle"
result ndarray should have been allocated
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Headers/Operations/GPUMultiaryKernelOps.h
_graphKernelDAG defined, this should be a stitched op
Input ndarray should be allocated
mps.stitched
_graphKernelDAG malformed
Can't use tensors of a different MPSGraph instance
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphOperation.mm
/readVariable
Subclass to implement
Op gradient not implemented, file a radar, all must be implemented
Op gradient with multiple outputs not implemented, file a radar, all must be implemented
gradient for %@
Subclass to implement (should only be called on controlflow ops
Unrecognized data layout
MPSGraphTensor *%s =
[graph %s:%s
scaleTensor:%s
zeroPointTensor:%s
dataType:%s
axis:%d
name:%s];
quantizeTensor
mps.quantize
dequantizeTensor
Could not find parameter with name 'x'.
Unexpected argument size for 'x'
Pooling is only supported for inputs of rank 3, 4, or 5
kernel_sizes
kernel_sizes parameter size must equal the dimension of the input.
required parameter "kernel_sizes" not found for pooling layer.
Strides parameter size must equal the dimension of the input.
matchAndRewriteGenericPool
MILToMLIRRewritePool.mm
ceil_mode
avg_pool
exclude_padding_from_average
max_pool
l2_pool
Unknown pooling type op.
mps.pooling_average
mps.pooling_max
mps.pooling_l2_norm
stride size should be == 4
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUStencilOps.mm
dilationRates size should be == 4
offsets is required when using PaddingStyle::EXPLICIT_OFFSET
offsets size should be == 4
explicitPadding is required when using PaddingStyle::EXPLICIT_OFFSET or PaddingStyle::EXPLICIT
explicitPadding size should be == 8
mps.stencil
getSExtValue
getSignificantBits() <= 64 && "Too many bits for int64_t"
SignExtend64
MathExtras.h
B > 0 && "Bit width can't be 0."
bitPosition < getBitWidth() && "Bit position out of bounds!"
mlirToMpsReductionMode
GPUStencilOps.mm
0 && "Unsupported reductionMode"
mlirToMpsStencilPadMode
0 && "Unsupported paddingMode"
%@/%@/sampleGridDataGradient/shapeOp
%@/%@/sampleGridDataGradient
-[MPSGraphSampleGridOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphSampleGrid.mm
-[MPSGraphSampleGridDataGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
mps.sample_grid
mps.sample_grid_data_gradient
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/ANERuntime/Operations/ANEConvolutionOps.mm
Conv2DOpHandler
ANEConvolutionOps.mm
Invalid padding mode
DilatedConv
KernelDilationX
KernelDilationY
KernelGroupReuse
0 && "ANE_GetANECIRDataTypeWithMPSDataType failed"
KernelType
KernelWidth
KernelHeight
KernelDepth
KernelMode
KernelMutable
PadTop
PadBot
PadLeft
PadRight
PadFront
PadBack
replication_padding
Replication
PaddingMode
KernelIndex
KernelOffset
Params
NumGroups
Conv2DDataGradientOpHandler
DeConv
dilationRate != 1 not supported
DepthwiseConv2DOpHandler
ChannelWiseConv
BiasMutable
BiasCount
BiasScaleGroupData
BiasIndex
BiasOffset
Neuron
EluOpHandler
ANEActivationOps.mm
alphaOp.valueAttr().isa<mlir::DenseElementsAttr>()
vals.isSplat()
vals.isFloatType()
EluAlpha
0 && "Alpha is not const"
SigmoidHighPrecision
LeakyReLU
ReluOffset
scalar input only fp16 supported, file a radar for your case...
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/ANERuntime/Operations/ANEActivationOps.mm
ReluSlope
mps.elu
mps.leaky_relu
mps.exponent_base_2
mps.logarithm_base_2
mps.relu
mps.sigmoid
mps.square_root
mps.tanh
mps.sign
mps.sin
mps.cos
MPSGraphTensorNamedDataLayoutNCHW
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Tools/Emit/EmitObjC/Operations/EmitObjCConvolutionOps.mm
MPSGraphTensorNamedDataLayoutNHWC
invalid conv2DOp.dataLayout
MPSGraphConvolution2DOpDescriptor *%sConvDescriptor =
[MPSGraphConvolution2DOpDescriptor descriptorWithStrideInX:%ld
strideInY:%ld
dilationRateInX:%ld
dilationRateInY:%ld
groups:%ld
paddingLeft:%ld
paddingRight:%ld
paddingTop:%ld
paddingBottom:%ld
paddingStyle:%s
dataLayout:%s
weightsLayout:%s];
MPSGraphTensor *%s =
[graph convolution2DWithSourceTensor:%s
weightsTensor:%s
descriptor:%sConvDescriptor
name:%s];
MPSGraphTensor *%s =
[graph convolutionTranspose2DWithSourceTensor:%s
weightsTensor:%s
outputShapeTensor:%s
descriptor:%sConvDescriptor
name:%s];
MPSGraphDepthwiseConvolution3DOpDescriptor *%sDWConvDescriptor =
[MPSGraphDepthwiseConvolution3DOpDescriptor descriptorWithStrides:%@
dilationRates:%@
paddingValues:%@
paddingStyle:%s];
%sDWConvDescriptor.channelDimensionIndex = %d;
MPSGraphTensor *%s =
[graph depthwiseConvolution3DWithSourceTensor:%s
weightsTensor:%s
descriptor:%sDWConvDescriptor
name:%s];
MPSGraphPaddingStyleExplicit
MPSGraphPaddingStyleTF_VALID
MPSGraphPaddingStyleTF_SAME
MPSGraphPaddingStyleExplicitOffset
MPSGraphPaddingStyleONNX_SAME_LOWER
unsupported paddingStyle for convolution
MPSGraphTensorNamedDataLayoutOIHW
MPSGraphTensorNamedDataLayoutHWIO
invalid conv2DOp.weightsLayout
RawAttributeUtils.h
truncate
this->size() >= N && "Cannot increase size with truncate"
copyElementsAttrData
numElements * sizeof(DstT) == outBuffSize && "invalid output buffer size"
unsupported type
../mlir-mps/include/mlir-mps/Support/RawAttributeUtils.h
unpackBooleanData
llvm::divideCeil(numElements, 8) == inData.size()
initial_h
weight_ih
weight_hh
direction
activation
output_sequence
initial_c
peephole
recurrent_activation
cell_activation
bias_back
weight_ih_back
weight_hh_back
peephole_back
For bidirectional LSTM if 'bias' is set then `bias_back` must also be set.
scaled_tanh
linear
sigmoid
hard_sigmoid
mps.singlegate_rnn
mps.broadcast_to
mps.lstm
mps.gru
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUScatterOps.mm
mps.scatter
mps.scatter_along_axis
mps.scatter_nd
mps.cumulative_sum
mps.cumulative_product
mps.cumulative_maximum
mps.cumulative_minimum
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUCumulativeOps.mm
input ndarray should have been allocated
Type is not shaped.
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Headers/Project/MPSGraphUtilities.h
Type is unranked.
getRank
BuiltinTypeInterfaces.h.inc
(*this).hasRank() && "cannot query rank of unranked shaped type"
getSanitizedOpName
0 && "ERROR: argument of a different block?"
operator()
mps.stitched_return
mps.exponent
mps.exponent_base_10
mps.logarithm_base_10
mps.square
mps.absolute
mps.negative
mps.signbit
mps.floor
mps.round
mps.rint
mps.tan
mps.sinh
mps.cosh
mps.asin
mps.acos
mps.atan
mps.asinh
mps.acosh
mps.atanh
mps.not
mps.is_infinite
mps.is_finite
mps.is_nan
mps.erf
mps.modulo
mps.power
mps.minimum
mps.maximum
mps.equal
mps.not_equal
mps.less_equal
mps.greater
mps.greater_equal
mps.and
mps.or
mps.nand
mps.nor
mps.xor
mps.xnor
mps.atan2
mps.clamp
mps.identity
mps.reduction_sum
mps.reduction_max
mps.reduction_min
mps.reduction_prod
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUMemrefTensorOps.mm
mps.tensor_to_memref
mps.memref_to_tensor
use a child class
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphCumulativeOps.mm
-[MPSGraphCumulativeSumOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
Cumulative##NAME##Op requires inputValues.size() to be equal to 2.
-[MPSGraphCumulativeProductOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphCumulativeMaximumOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphCumulativeMinimumOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
cumulativeMaximumReturnIndices is not yet supported
cumulativeMinimumReturnIndices is not yet supported
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUResizeOps.mm
mps.resize_gradient
data layout to resample should be nchw or nhwc
scale and offset tensor must have length 4
MPSGraphNearestRoundingModeToNDArrayNearestRoundingMode
GPUResizeOps.mm
0 && "Invalid nearest rounding mode"
MPSGraphResizeModeToNDArrayResampleMode
0 && "Invalid resize mode"
MPSGraphTensor *%s =
[graph meanOfTensor:%s
axes:%s
name:%s];
MPSGraphTensor *%s =
[graph varianceOfTensor:%s
axes:%s
name:%s];
MPSGraphTensor *%s =
[graph softMaxWithTensor:%s
axis:%ld
name:%s];
mps.reduction_mean
mps.reduction_variance
mps.softmax
getNumElements
hasStaticShape() && "cannot get element count of dynamic shaped type"
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUTransposeOps.mm
readDimOrder
GPUTransposeOps.mm
rank == permValues.size()
invalid axis
Reinterpret cast with boolean input not yet supported
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUReinterpretCastOps.mm
Reinterpret cast with boolean output not yet supported
encodeOp
GPUReinterpretCastOps.mm
reinterpretedNDArray
mps.reinterpret_cast
resultsVersion
function
constexpr_cast
constexpr_affine_dequantize
constexpr_lut_to_dense
constexpr_sparse_to_dense
dequantize
dynamic_dequantize
dynamic_quantize
quantize
tensor_buffer_to_tensor
tensor_to_tensor_buffer
upsample_bilinear
batch_norm
variance
Could not find parameter with name 'epsilon'.
Unexpected argument size for 'epsilon'
mps.normalization
batch_to_space
block_shape
Could not find parameter with name 'crops'.
Unexpected argument size for 'crops'
Unexpected length for 'crops' or 'block_shape' or 'rank(x)'
mps.batch_to_space
concat
interleave
`val` attribute is not a tensor.
Failed to materialize constant.
cumsum
exclusive
einsum
Non-supported number of inputs.
mps.gelu
innerproduct
weights
instance_norm
layer_norm
local_response_norm
matmul
transpose_x
transpose_y
reduce_argmin
keep_dims
mps.reduction_argmin
reduce_argmax
mps.reduction_argmax
reduce_l1_norm
reduce_l2_norm
reduce_log_sum_exp
mps.reduction_logsumexp
reduce_log_sum
reduce_max
reduce_mean
reduce_min
reduce_prod
reduce_sum
reduce_sum_square
reshape
reshape with 0 (copy from input) targeting an unknown
space_to_batch
paddings
Could not find parameter with name 'paddings'.
Unexpected argument size for 'paddings'
Unexpected length for 'paddings' or 'block_shape'
mps.space_to_batch
squeeze
clamped_relu
leaky_relu
linear_activation
mps.relu6
sigmoid_hard
mps.sigmoid_hard
softmax
softplus
mps.softplus
softplus_parametric
mps.softplus_parametric
softsign
mps.softsign
thresholded_relu
minimum
maximum
real_div
greater
greater_equal
less_equal
logical_and
not_equal
logical_or
logical_xor
floor_div
mps.floor_divide
logical_not
square
threshold
select
identity
one_hot
indices
one_hot_vector_size
on_value
off_value
mps.one_hot
mps.shape
mps.tile
scatter_nd
updates
update
scatter
scatter_along_axis
gather_nd
mps.gather_nd
gather
mps.gather
gather_along_axis
mps.gather_along_axis
expand_dims
fill_like
ref_tensor
transpose
depth_to_space
block_size
mps.depth_to_space_2d
space_to_depth
mps.space_to_depth_2d
pixel_shuffle
upscale_factor
pixel_unshuffle
downscale_factor
band_part
mps.band_part
-[MPSGraphMatrixInverseOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphInverseOps.mm
mps.matrix_inverse
-[MPSGraphOneHotOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphOneHotOps.mm
Error: axis must be less than rank of result tensor
/reshape
oneHot/reshape
/oneHot/cast
/scale
oneHot/scale
/offset
oneHot/offset
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphArithmeticOps.mm
createTernaryArithmeticOp
MPSGraphArithmeticOps.mm
inputValues->size() == 3 && "Incorrect number of inputs providedd for this mathOp"
unimplemented math op
%@/%@/braodcastGrad
%@/%@/multiplication
%@/%@/multiplication_LN2
%@/%@/multiplication_LN10
%@/%@/division
%@/%@/multiplication_2.0
%@/%@/reverseSqrt
%@/%@/multiplication_0.5
%@/%@/pow_-1.5
%@/%@/multiplication_-0.5
%@/%@/negative
%@/%@/square
%@/%@/sign
%@/%@/cos
%@/%@/reciprocal
%@/%@/cosh
%@/%@/sinh
%@/%@/tanh
%@/%@/subtraction_1
%@/%@/subtraction
%@/%@/reverseSquareRoot
%@/%@/addition
%@/%@/rsqrt
%@/%@/multiplication_1
inputTensor == self.inputTensors[inputIndex] failed
%@/%@/floor
%@/%@/subraction
%@/%@/power
%@/%@/multiplication2
%@/%@/logarithm
%@/%@/lessThan
%@/%@/greaterThanOrEqualTo
%@/%@/greaterThan
%@/%@/lessThanOrEqualTo
%@/%@/square_1
%@/%@/add
%@/%@/divide
%@/%@/select
%@/%@/logicalOR
-[MPSGraphArithmeticOp partialDerivativeForInputTensor:incomingGradient:inputIndex:name:]
0 && "unimplemented math op"
%@/division
divisionNoNaN/division
%@/select
divisionNoNaN/select
floorMod/division
%@/floor
floorMod/floor
%@/multiply
floorMod/multiply
%@/subtract
floorMod/subtract
createUnaryArithmeticOp
inputValues->size() == 1 && "Incorrect number of inputs providedd for this mathOp"
mps.truncate
mps.bitwise_not
mps.bitwise_popcount
createBinaryArithmeticOp
inputValues->size() == 2 && "Incorrect number of inputs providedd for this mathOp"
createBinaryCmpArithmeticOp
mps.bitwise_and
mps.bitwise_or
mps.bitwise_xor
mps.bitwise_left_shift
mps.bitwise_right_shift
-[MPSGraphSingleGateRNNOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphRNNOps.mm
MPSGraphRNNOps.mm
inputValues->size() > index
-[MPSGraphSingleGateRNNGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphLSTMOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphLSTMOp partialDerivativesForInputTensors:incomingGradients:name:]
_inputTensors.count > index
-[MPSGraphLSTMGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphGRUOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphGRUOp partialDerivativesForInputTensors:incomingGradients:name:]
GRU fwd
-[MPSGraphGRUGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
%@ W^T
For bidirectional RNN recurrentWeight cannot be dynamic.
%@ + b
%@ - training state
lastSlice
total derivative last state
For bidirectional LSTM recurrentWeight cannot be dynamic.
For bidirectional LSTM cannot be dynamic.
-[MPSGraph(MPSGraphRNNOps) LSTMGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:cellOutputFwd:stateGradient:cellGradient:inputWeight:bias:initState:initCell:mask:peephole:descriptor:name:]
!peephole
For bidirectional GRU recurrentWeight cannot be dynamic.
For bidirectional GRU cannot be dynamic.
mps.singlegate_rnn_gradient
mps.lstm_gradient
mps.gru_gradient
NSArray<MPSGraphTensor *> *returnTensors = %s;
mps.constant should have a value attr
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Tools/Emit/EmitObjC/Operations/EmitObjCStandardOps.mm
MPSGraphTensor *%s =
[graph constantWithScalar:%s
shape:%s
dataType:%s];
INFINITY
MPSGraphTensor *%s =
[graph constantWithScalar:%f
shape:%s
dataType:%s];
MPSGraphTensor *%s =
[graph constantWithData:[data subdataWithRange:NSMakeRange(%lu, %lu)]
shape:%s
dataType:%s];
const char *%s_b64 = "%s";
MPSGraphTensor *%s =
[graph constantWithData:decodeBase64(%s_b64)
shape:%s
dataType:%s];
MPSGraphTensor *%s =
[graph constantWithData:MPSGraphTestDescriptor::genRandomConstant(%s, %lu)
shape:%s
dataType:%s];
func.return
-[MPSGraphConditionOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphControlFlowOps.mm
-[MPSGraphYieldOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
findInvalidTemps
MPSGraphControlFlowOps.mm
originalBlock != nil
defBlock != rootBlock && useBlock != rootBlock && "Should never extract from root"
useDepth >= defDepth && "The use must be below the depth"
extractedCount == injectedCount && "extract / inject block must be at the same level"
extractTempsFromOp
extractIt != subBlockInfos.extractedTemps.end()
!toExtractVals.empty() && "shouldn't have recursed if there if nothing to extract"
extractedValues.size() == toExtractVals.size()
extractedValues[i] != nil
injectTempsIntoOp
it.second == nil && "value shouldn't be injected yet"
injectedValue != nil && "value should be already injected"
!toInjectVals.empty() && "shouldn't have recursed if there is nothing to inject"
injectedVals.size() == toInjectVals.size()
blockToInject.size() == blockInjected.size()
injectIt != subBlockInfos.injectedTemps.end() && injectIt->second == nil && "value shouldn't be injected yet"
fixInvalidOpsInBlock
infos.opsWithInvalidTemps.size() != 0
useBlock == block
it != blockInfos.injectedTemps.end()
injectedTensor != nil && "value should be injected"
-[MPSGraphIfElseOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
If there is no else block then the number of results returned by thenBlock must be 0
_falseResults
_falseResults.count == _trueResults.count
getElementTypeOrSelf(_trueResults[i].value.getType()) == getElementTypeOrSelf(_falseResults[i].value.getType())
thenYieldOp && "thenRegion must have a terminator"
elseYieldOp && "elseRegion must have a terminator"
thenResultSize == elseResultSize && "then and else blocks should have equal number of return values"
mlir::succeeded(joinTypes(thenType, elseType, resultType))
-[MPSGraphWhileOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
Invalid WhileOp Condition Block: Caller must set the predicateTensor in the conditionBlock
if_cast
whilePredicate/reshape
-[MPSGraphForLoopOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
for_cast
getOpData
0 && "not a ControlFlow op"
buildGrad
[op.outputTensors containsObject:outTensor]
@"NSArray"8@?0
ifOuts.count == neededEscaped.size()
ifescaped0
recurseForUsesFromBlockInput
0 && "need to be overriden"
subtypes.size() == SubtypesCount && "subtypes array size differs from the expected number of subtypes"
can't create type '
' because storage uniquer isn't initialized: the dialect was likely not loaded, or the type wasn't added with addTypes<...>() in the Dialect::initialize() method.
llvm::StringRef llvm::getTypeName() [DesiredTypeName = mlir::mps::ListType]
Allocate
Allocator.h
Adjustment + Size >= Size && "Adjustment + Size must not overflow"
AlignedAddr + Size <= (uintptr_t)NewSlab + PaddedSize
AlignedAddr + SizeToAllocate <= (uintptr_t)End && "Unable to allocate memory!"
alignAddr
Alignment.h
static_cast<uintptr_t>(ArithAddr + Alignment.value() - 1) >= ArithAddr && "Overflow"
getRegion
index < numRegions && "invalid region index"
scf.if
rewrite
newOutputsTypes.size() == thenBlockOutputs.count
newOutputsTypes.size() == elseBlockOutputs.count
operator-
STLExtras.h
base == rhs.base && "incompatible iterators"
transferBeforeImpl
ilist_base.h
&Next != &First && "Insertion point can't be one of the transferred nodes"
0 && "Unsupported operation"
outputGradTensor == nil
loopgradinit0
@"MPSGraphTensor"24@?0@"NSArray"8@"NSMutableArray"16
@"NSArray"16@?0@"NSArray"8
scf.while
newOpTypes.size() == newOpInputs.count
newInputsCount == beforeBlockOutputs.count
newInputsCount == afterBlockOutputs.count
extendBlockInputs
mpsBlock->_mlirBlock == &block
createLoop_block_invoke
condTensor == nil
@"NSArray"24@?0@"MPSGraphTensor"8@"NSArray"16
gradsForBlock
escapedGradTensor != nil
recurseForUsesFromOpOutput
lock == 0 && "Recursive visit of the loop"
0 && "Invalid block"
addBlockOutputs
injectedsInBlock != nil
scf.for
newInputsCount - 3 == bodyBlockOutputs.count
AddForInjectValuesRewrite
toInjectValues.size() == 1
UseDefLists.h
scf.yield
createPartialDerivatives
neededInputsGrads.size() == neededInputs.size()
neededEscapedsGrads.size() == neededEscapeds.size()
replaceAllUsesWith
(!newValue || this != OperandType::getUseList(newValue)) && "cannot RAUW a value with itself"
scf.condition
tensor.extract
mps.broadcast_gradient_args
map::at: key not found
Index < size() && "invalid index for value range"
tensor.from_elements
-[MPSGraphDepthwiseConvolution2DOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphDepthwiseConvolutionOps.mm
%@/%@/depthwiseConvolution2DDataGradient/shapeOp
%@/%@/depthwiseConvolution2DDataGradient
%@/%@/convolutionTranspose2DDataGradient/shapeOp
%@/%@/convolution2DWeightsGradient
-[MPSGraphDepthwiseConvolution2DDataGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
%@/%@/depthwiseConvolution2DWeightsGradient
-[MPSGraphDepthwiseConvolution2DWeightsGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
`strides` must contain 3 values instead of %lu
`dilationRates` must contain 3 values instead of %lu
`paddingValues` must contain 6 values instead of %lu
`paddingStyle` must be one of %s
MPSGraphPaddingStyleExplicit, MPSGraphPaddingStyleONNX_SAME_LOWER, MPSGraphPaddingStyleTF_SAME or MPSGraphPaddingStyleTF_VALID for MPSGraphDepthwiseConvolution.
-[MPSGraphDepthwiseConvolution3DOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
%@/%@/depthwiseConvolution3DDataGradient/shapeOp
%@/%@/depthwiseConvolution3DDataGradient
%@/%@/convolution3DWeightsGradient
-[MPSGraphDepthwiseConvolution3DDataGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
MPSGraphDepthwiseConvolutionOps.mm
inputValues->size() == 2 || inputValues->size() == 3
%@/%@/depthwiseConvolution3DWeightsGradient
-[MPSGraphDepthwiseConvolution3DWeightsGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
sourceTensor rank must be 4
weightsTensor rank must be 4
dataLayout should be one of NCHW,CHW,HW,NHWC,HWC
Conv2D Gradient Error: outputShape must have 4 values
outputShape rank must be 1
sourceTensor rank must be at least 4
Conv3D Gradient Error: outputShape must have at least 4 values
gradientTensor rank must be at least 4
CoreTensor
type.hasRank()
type.getElementType().isInteger(32) || type.getElementType().isInteger(64)
non constant axis tensor
getShapeFromValue
all source ndarrays should have been allocated
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUPoolingOps.mm
Multi destination pooling kernel returned indices must not be used with poolingReturnIndicesMode set to None
mps.pooling_max_with_indices
mps.pooling_average_gradient
mps.pooling_l2_norm_gradient
GPUPoolingOps.mm
outputShapeArr.size() == 4 && "unexpected output shape passed"
mps.pooling_max_gradient
PoolGradient can't be stitched
getMLIRElementType
MPSGraphUtilities.mm
0 && "unexpected MPSDataType"
getMPSGraphType
0 && "Unnsupported mlir type"
getMLIRType
0 && "Unsupported MPSGraphType"
ParseEnvironmentOptions
progName && "Program name not specified"
envVar && "Environment variable name missing"
unsupported datatype for constant
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm
splat missmatch for constant
mpsFileLoc
memref getStrideInBytes failed
memref getStridesAndOffset failed
Unsupported pixel format %s
Unsupported pixel format
packBooleanData
llvm::divideCeil(numElements, 8) == outData.size()
func.func
false && "mlir::Type does not have a corresponding MPSDataType"
(elementTy.getWidth() == 1 || !elementTy.isSignless()) && "mlir types are always signed"
getBody
OpDefinition.h
!region.empty() && "unexpected empty region"
tensor
UndefinedName
IR: %s
Shape: %@
-[MPSGraphReductionBaseOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
MPSGraphReductionOps.mm
0 && "use a child class"
-[MPSGraphReductionSumOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphReductionOps.mm
ShapeForReductionGrad
Broadcast to input shape
-[MPSGraphReductionMinOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReductionMaxOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReductionMinPropagateNaNOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReductionMaxPropagateNaNOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReductionProdOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReductionAndOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReductionOrOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReductionMeanOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/dimSize
meanGrad/dimSize
/reductionProduct
meanGrad/reductionProduct
meanGrad/cast
/reciprocal
meanGrad/reciprocal
-[MPSGraphReductionArgBaseOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReductionArgMinOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReductionArgMaxOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
mps.reduction_and
mps.reduction_or
you can set only 1 pre-power event
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraph.mm
mps.compilerOptions
mps.aneCompilerSpatialSplitting
mps.optimizationLevel
mps.optimizationProfile
mps.device
mps.deviceType
MPSGRAPH_MLIR_CL
MPSGRAPH_LOG_INFO
MPSGRAPH_COMPILER_STITCHING
-[MPSGraph init]
MPSGraph.mm
IR: %s
OATS_CONFIG_ID
Error: can't get a metal device
v32@?0@"MPSGraphTensor"8@"MPSGraphTensorData"16^B24
Placeholder shape rank mismatches
Placeholder shape mismatches (expected %ld vs got tensorData with %ld) at dimIdx = %lu
Error: executionDescriptor must be present
try_emplace
StringMap.h
NumItems + NumTombstones <= NumBuckets
addEntryBlock
FunctionOpInterfaces.h.inc
empty() && "function already has an entry block"
Only layout NCHW is supported for resizeOp
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/ANERuntime/Operations/ANEResizeOps.mm
Resize
OutputHeight
OutputWidth
Height
Coordinate
NearestNeighbor
SamplingMethod
Linear
SamplingMethodInfo
OffsetDefault
SamplingGridMode
AlignedCorners
Default
UnalignedCorners
SamplingGridInfo
ANEResizeOps.mm
Float16
Unsupported feature
Violations identified
Found Violation '%@'.
ANE unit validation failed
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/ANERuntime/Headers/ANERuntime_Project.h
1.0.10
Networks
Version
ANERuntime
ANERuntime.mm
%@net.plist
Device does not have ANE
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/ANERuntime/ANERuntime.mm
Weights
Inputs
Outputs
initializeOps
"input list does not exist in network" && 0
block_argument_%d
rank < 5 failed for ANE
rank > 2 failed for ANE
NetworkStatusList
evaluateOps
ANEFModelProcedures.count==1
LiveInputList
LiveOutputList
aneIOSurface
ANE Evaluation Error = %@
v20@?0B8@"NSError"12
ANE Scheduling Error = %@
Unsupported ANE operation %s
evaluateOp
false && "Unexpected operation"
shape for TensorData is not static, ANE can't do dynamic shapes
ioSurface allocation failed for : %@
Memory
GenericDAG
SpatialSplitMode
MPSGraph_ANE_compilerOptions.plist
Error:
ANE plist:
Error = %@
compilePlist
ANE plist:
ANE compilation writeToFile failed!
ANE compilation failed!
ANE load failed!
~ANERuntime
InputType
InputWidth
InputHeight
InputDepth
InputChannels
addNetworkInputs
0 != inputInterleave
InputInterleave
BatchSize
Bottom
addNetworkOutput
OutputType
OutputInterleave
mps.ane_multiply
mps.assign_variable
mps.conv_2d_weights_gradient
mps.conv_3d
mps.conv_3d_data_gradient
mps.conv_3d_weights_gradient
mps.create_texture_tensor
mps.dense_sparse_matmul
mps.dimension_size
mps.dynamic_shape_cast
mps.file_backed_constant
mps.hamming_distance
mps.local_convolution
mps.local_convolution_data_gradient
mps.local_convolution_weight_gradient
mps.make_list
mps.matrix_solver_lu
mps.pad_gradient
mps.prune
mps.prune_gradient
mps.random_truncated_normal
mps.rank
mps.read_variable
anec.region_call
mps.size
mps.sort
mps.argsort
mps.sparse_dense_matmul
mps.split
mps.strided_slice
mps.strided_slice_gradient
mps.list_pop_back
mps.list_push_back
mps.tf_executor_fetch
mps.tf_executor_graph
mps.tf_executor_island
mps.tf_executor_yield
mps.tile_gradient
mps.top_k_grad
mps.type_constraint
mps.update_random_state
mps.var_handle
unordered_map::at: key not found
layout is not supported
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphResizeOps.mm
-[MPSGraphResizeOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphResizeGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
GetXCoord
isEqual
additionOp
subtractionOp
multiplicationOp
divisionOp
moduloOp
powerOp
minimumOp
maximumOp
isEqualOp
isNotEqualOp
lessThanOp
lessThanEqualToOp
greaterThanOp
greaterThanEqualToOp
nandOp
xnorOp
atan2Op
exponentOp
exponentBase2Op
exponentBase10Op
logarithmOp
logarithmBase2Op
logarithmBase10Op
squareOp
squareRootOp
reverseSquareRootOp
reciprocalOp
absoluteOp
negativeOp
signOp
signbitOp
ceilOp
floorOp
roundOp
rintOp
sinhOp
coshOp
tanhOp
asinOp
acosOp
atanOp
asinhOp
acoshOp
atanhOp
isInfiniteOp
isFiniteOp
isNaNOp
variableFinalUpdate
result
Error: variable not found
non constant permute tensor
slice start is not in the slice range of input MPSNDArray
slice length is not in the slice range of input MPSNDArray
inputs.size() > 0
source && "Expand should always alias"
mps.materialize_sparse_tensor
yTensor
zTensor
mps.matmulPrimaryGrad
mps.matmulSecondaryGrad
0 <= mpsAxis && mpsAxis < 4 && "Runtime canonicalization must simplify reduction axes to minor 4 dimensions."
mps.tf_executor.fetch
mps.tf_executor.graph
mps.tf_executor.island
mps.tf_executor.yield
output list must not be allocated
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPUListOps.mm
not a list
element data should be allocated
TensorListPushBack Runtime error: reached tensorlist max size
ListPopBack Runtime error: list is empty
result data should have been allocated
resultTensorData must not be allocated
result NDArray should have been allocated
getPaddings
shape.size() == 2 && shape[1] == 2
non constant paddings tensor
getConstantValue
constOpDef.valueAttr().isa<mlir::DenseElementsAttr>()
0 && "Unsupported type"
getMultipliers
shape.size() == 1
-[MPSGraphNormalizationOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphNormalizationOps.mm
normalizationGradient/cast
/addition
normalizationGradient/addition
normalizationGradient/sqrt
/divison
normalizationGradient/divison
/multiplication
normalizationGradient/multiplication
normalizationGradient/sum
/broadcastGradShape
normalizationGradient/broadcastGradShape
/broadcastGradReshape
normalizationGradient/broadcastGradReshape
/meannegative
normalizationGradient/mean/negative
/mean/sum
normalizationGradient/mean/sum
/mean/broadcastGradShape
normalizationGradient/mean/broadcastGradShape
/mean/broadcastGradReshape
normalizationGradient/mean/broadcastGradReshape
/variance/multiplication
normalizationGradient/variance/multiplication
/variance/subtraction
normalizationGradient/variance/subtraction
/variance/divison
batchNormGammaGradient/variance/divison
/variance/sum
normalizationGradient/variance/sum
/variance/broadcastGradShape
normalizationGradient/variance/broadcastGradShape
/variance/broadcastGradReshape
normalizationGradient/variance/broadcastGradReshape
/gamma/subtraction
normalizationGradient/gamma/subtraction
/gamma/divison
normalizationGradient/gamma/divison
/gamma/multiplication
normalizationGradient/gamma/multiplication
/gamma/sum
normalizationGradient/gamma/sum
/gamma/broadcastGradShape
normalizationGradient/gamma/broadcastGradShape
/gamma/broadcastGradReshape
normalizationGradient/gamma/broadcastGradReshape
/beta/sum
normalizationGradient/beta/sum
/beta/broadcastGradShape
normalizationGradient/beta/broadcastGradShape
/beta/broadcastGradReshape
normalizationGradient/beta/broadcastGradReshape
/subtraction
variance/subtraction
/square
variance/square
variance/mean
batchNormGammaGradient/addition
batchNormGammaGradient/sqrt
batchNormGammaGradient/subtraction
batchNormGammaGradient/divison
batchNormGammaGradient/multiplication
batchNormGammaGradient/sum
batchNormGradient/addition
batchNormGradient/reciprocal
batchNormGradient/reciprocal2
/dimSize%d/
batchNormGradient/dimSize
/mul%d/
batchNormGradient/mul
batchNormGradient/cast
/gammaGradient
batchNormGradient/gammaGradient
/betaGradient
batchNormGradient/betaGradient
/multiplication1
batchNormGradient/multiplication1
batchNormGradient/subtraction
/multiplication2
batchNormGradient/multiplication2
/multiplication3
batchNormGradient/multiplication3
/multiplication4
batchNormGradient/multiplication4
/multiplication5
batchNormGradient/multiplication5
/subtraction1
batchNormGradient/subtraction1
/subtraction2
batchNormGradient/subtraction2
batchNormGradient/multiplication
only 4D input is supported
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/ANERuntime/Operations/ANEPaddingOps.mm
Padding
PadChannelFront
PadChannelBack
PadBatchFront
PadBatchBack
BackgroundValue
Background
Reflective
Symmetric
Unsupported padding mode on ANE
Channel
PaddingInfo
ANEPaddingOps.mm
CommonRuntimeUtils.h
-[MPSGraphTopKOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphTopKOps.mm
-[MPSGraphTopKGradientOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphSparseTensorOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphSparseOps.mm
-[MPSGraphPlaceholderOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphMemoryOps.mm
-[MPSGraphConstantOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphVariableOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphReadVariableOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphAssignVariableOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
-[MPSGraphCreateTextureTensorOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
shape.count > 0 failed, a constant must be passed a ranked shape
shape[%lu] (%ld) should be a strictly non negative value for constant operation
shape[%lu] (%ld) should be a strictly positive value for constant operation
Unimplemented maxPooling Indices which were used!
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Tools/Emit/EmitObjC/Operations/EmitObjCPoolingOps.mm
invalid poolMax.paddingStyle
MPSGraphPooling4DOpDescriptor *%spoolDesc =
[MPSGraphPooling4DOpDescriptor descriptorWithKernelSizes:%s
strides:%s
dilationRates:%s
paddingValues:%s
paddingStyle:%s];
%spoolDesc.ceilMode = %s;
%spoolDesc.includeZeroPadToAverage = %s;
MPSGraphTensor *%s =
[graph %sPooling4DWithSourceTensor:%s
descriptor:%spoolDesc
name:%s];
-[MPSGraphSortOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphSortOps.mm
SortOp requires inputValues.size() to be equal to 2.
-[MPSGraphArgSortOp makeMLIROpWithBuilder:symbolTable:inputValues:opInitialization:name:]
MPSGRAPH_EMIT_OBJC_DUMP
MPSGRAPH_EMIT_OBJC_DUMP EV is on
builtin.module
Error: MLIR pass manager failed
/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Tools/Emit/EmitObjC/EmitObjC.mm
// Automatic code generation with EmitObjC
#ifndef ModelObjC_h
#define ModelObjC_h
#import <Foundation/Foundation.h>
#import <MetalPerformanceShaders/MetalPerformanceShaders.h>
#import <MetalPerformanceShadersGraph/MetalPerformanceShadersGraph.h>
NS_ASSUME_NONNULL_BEGIN
// %s
Unimplemented emitObjC for MPS operation %s
tensor%lu
%@/emitObjC
%@/modelObjC.h
%@/main.m
%@/modelObjCConstants.dat
// autogenerated main
#import "modelObjC.h"
static inline size_t sizeofMPSDataTypeLocal(MPSDataType t)
return (t & 0xFFFF) >> 3;
MPSGraphTensorData *allocateRandTensorDataWithType(MPSGraphShapedType *type,
id<MTLDevice> runDevice,
BOOL forceOnes){
srand(1);
NSInteger numberOfElements = 1;
for (int i = 0; i < type.shape.count; i++) {
numberOfElements *= type.shape[i].integerValue;
size_t bufferLength = 1;
bufferLength *= (((type.shape[type.shape.count - 1].integerValue * sizeofMPSDataTypeLocal(type.dataType) + 63) / 64) * 64);
size_t rowBytes = bufferLength;
for (int i = 0; i < type.shape.count - 1; i++) {
bufferLength *= type.shape[i].integerValue;
id<MTLBuffer> buffer = [runDevice newBufferWithLength:bufferLength options:MTLResourceStorageModeShared];
MPSGraphTensorData *tensorData = [[MPSGraphTensorData alloc] initWithMTLBuffer:buffer
shape:type.shape
dataType:type.dataType
rowBytes:rowBytes];
MPSNDArray *ndArray = tensorData.mpsndarray;
void *data = malloc(sizeofMPSDataTypeLocal(type.dataType) * numberOfElements);
if(type.dataType == MPSDataTypeFloat32){
float *dataIn = (float *)data;
for (int i = 0; i < numberOfElements; i++) {
dataIn[i] = forceOnes ? 1.0f : ((float)rand()/(float)RAND_MAX);
}
} else if (type.dataType == MPSDataTypeFloat16){
__fp16 *dataIn = (__fp16 *)data;
for (int i = 0; i < numberOfElements; i++) {
dataIn[i] = forceOnes ? 1.0f : ((float)rand()/(float)RAND_MAX);
}
} else if (type.dataType == MPSDataTypeInt32){
int *dataIn = (int *)data;
for (int i = 0; i < numberOfElements; i++) {
dataIn[i] = rand();
}
} else {
assert(0);
[ndArray writeBytes:data strideBytes:nil];
free(data);
return tensorData;
void runPerfLoop(id<MTLCommandQueue> commandQueue,
MPSGraphExecutable *graph,
NSArray<MPSGraphTensorData *> * inputArray,
NSArray<MPSGraphTensorData *> * _Nullable fetch,
uint32_t iterations,
uint32_t printEvery)
// Build graph descriptor.
MPSGraphExecutableExecutionDescriptor *executableExecutionDescriptor = [MPSGraphExecutableExecutionDescriptor new];
executableExecutionDescriptor.waitUntilCompleted = YES;
// pre-warm up iteration
// If the outputs are dynamic, they'll be allocated by the runtime in the first run.
fetch = [graph runAsyncWithMTLCommandQueue:commandQueue
inputsArray:inputArray
resultsArray:fetch
executionDescriptor:executableExecutionDescriptor];
__block double sumOfTimes = 0;
CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent();
__block CFAbsoluteTime tic = CFAbsoluteTimeGetCurrent();
dispatch_semaphore_t doubleBufferingSemaphore = dispatch_semaphore_create(2);
__block uint32_t currentIteration = 0;
for (uint32_t i = 1; i <= iterations; i++) {
@autoreleasepool {
dispatch_semaphore_wait(doubleBufferingSemaphore, DISPATCH_TIME_FOREVER);
MPSGraphExecutableExecutionDescriptor *executableExecutionDescriptor = [MPSGraphExecutableExecutionDescriptor new];
if (i == iterations)
executableExecutionDescriptor.waitUntilCompleted = YES;
executableExecutionDescriptor.completionHandler =
^(NSArray<MPSGraphTensorData *> *_Nonnull results, NSError *_Nullable error) {
if (error) {
NSLog(@"%@\n%@", error.localizedDescription, error.description);
exit(1);
}
dispatch_semaphore_signal(doubleBufferingSemaphore);
currentIteration++;
CFAbsoluteTime toc = CFAbsoluteTimeGetCurrent();
double time = 1000 * (toc - tic) / currentIteration;
// Exclude the first iteration from the average.
sumOfTimes += time;
if (currentIteration % printEvery == 0)
NSLog(@"Time taken by MPSGraph eval in iteration %d = %f ms\n", currentIteration, time);
};
// If the outputs are dynamic, they'll be allocated by the runtime in the first run.
fetch = [graph runAsyncWithMTLCommandQueue:commandQueue
inputsArray:inputArray
resultsArray:fetch
executionDescriptor:executableExecutionDescriptor];
}
CFAbsoluteTime endTime = CFAbsoluteTimeGetCurrent();
double numIter = MAX(iterations, 1);
NSLog(@"Average MPSGraph full execution time = %f ms\n", 1000 * (endTime - startTime) / numIter);
BOOL isDynamicShape(MPSGraphShapedType *type){
if(!type.shape){
return YES;
for (int i = 0; i < type.shape.count; i++) {
if(type.shape[i].integerValue == -1){
return YES;
}
return NO;
int main(int argc, const char * argv[]) {
@autoreleasepool {
// Replace nil with path to .dat file if model has constants
NSString* constantsPath = [[NSBundle mainBundle] pathForResource: @"modelObjCConstants" ofType: @"dat"];
NSData *loadedData = constantsPath ? [NSData dataWithContentsOfFile:constantsPath] : nil;
NSMutableArray<MPSGraphShapedType *> *inputTypes = [NSMutableArray new];
NSMutableArray<MPSGraphShapedType *> *outputTypes = [NSMutableArray new];
MPSGraphExecutable *executable = getMPSGraphExecutable(loadedData, inputTypes, outputTypes, MPSGraphOptimizationLevel1);
// printf("%s\n", [executable debugDescription].UTF8String);
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
id<MTLCommandQueue> commandQueue = device.newCommandQueue;
NSMutableArray<MPSGraphTensorData *> *inputArray = @[].mutableCopy;
for(NSUInteger i = 0; i < inputTypes.count; i++){
MPSGraphShapedType *type = inputTypes[i];
assert(!isDynamicShape(type) && "Please provide the shape since the model supports dynamic shapes");
[inputArray addObject:allocateRandTensorDataWithType(type, device, NO)];
}
NSMutableArray<MPSGraphTensorData *> *outputArray = @[].mutableCopy;
for(NSUInteger i = 0; i < outputTypes.count; i++){
MPSGraphShapedType *type = outputTypes[i];
assert(!isDynamicShape(type) && "Please provide the shape since the model supports dynamic shapes");
[outputArray addObject:allocateRandTensorDataWithType(type, device, NO)];
}
runPerfLoop(commandQueue, executable, inputArray, outputArray, 100, 20);
return 0;