MTLTextureDescriptor has width (16900) greater than the maximum allowed size of 16384.

See original GitHub issue

validateTextureDimensions:1075: failed assertion `MTLTextureDescriptor has width (16900) greater than the maximum allowed size of 16384.’

Upgraded to MacOs Majove, and started getting this error when nothing else was upgraded.

This error occurs when converting keras model - coremltools.converters.keras.convert(model)

Here is the model (this worked fine before upgrading):

LEARNING_RATE = 1e-3 model = Sequential() model.add(Reshape((4,16900,3), input_shape=(1,202800))) model.add(Conv2D(32, (8, 8), strides=(4, 4), padding=‘same’ ,kernel_initializer=‘random_uniform’)) model.add(Activation(‘relu’))

model.add(Conv2D(64, (4, 4), strides=(2, 2), padding=‘same’ ,kernel_initializer=‘random_uniform’)) model.add(Activation(‘relu’))

model.add(Conv2D(64, (3, 3), strides=(1, 1), padding=‘same’ ,kernel_initializer=‘random_uniform’)) model.add(Activation(‘relu’))

model.add(Flatten()) model.add(Dense(512)) model.add(Activation(‘relu’)) model.add(Dense(4))

adam = Adam(lr=LEARNING_RATE) model.compile(loss=‘mse’, optimizer=‘adam’) model.summary()

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
rogerluancommented, May 4, 2022

There is no workaround for this. That is a hardcoded limit that is imposed. See https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf for the limit of each chip, e.g.:

image
0reactions
TobyRosemancommented, Feb 2, 2022

Since we have not heard back here, I’m going to close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

failed assertion `MTLTextureDescriptor has width (45000 ...
validateTextureDimensions:759: failed assertion `MTLTextureDescriptor has width (45000) greater than the maximum allowed size of 16384.'.
Read more >
error 'Texture Descriptor Validati… | Apple Developer Forums
MTLTextureDescriptor has height (4294967295) greater than the maximum allowed size of 16384. MTLTextureDescriptor has invalid pixelFormat (0).
Read more >
Metal error on 4.6.3 [Solved] - Unity Forum
My game freeze on load then I build with Metal (Universal) on iPhone 6. I have this error in debug MTLTexture.m failed assertion ......
Read more >
Resolved: MTLTextureDescriptor has height greater than the ...
... has height greater than the maximum allowed size error - Daily Developer ... 13 models support 2D texture with resolution up to...
Read more >
Mtltexturedescriptor
validateTextureDimensions:1075: failed assertion `MTLTextureDescriptor has width (16900) greater than the maximum allowed size of 16384.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found