Open josephrocca opened 7 months ago
run into the same problem
The spec defines GPUSize64
as unsigned long long
, which uses ConvertToInt
, so it appears that bigint
is not allowed. Is this a spec bug?
@josephrocca Could you print the output of this code from your repl in both Chrome and deno?
const adapter = await navigator.gpu.requestAdapter();
console.log(adapter.limits);
@mmastrac Sorry for delay - was waiting to get access to the Windows machine again (I have linux, which doesn't support webgpu on chrome). Here are the logs:
Chrome:
maxTextureDimension1D: 16384
maxTextureDimension2D: 16384
maxTextureDimension3D: 2048
maxTextureArrayLayers: 2048
maxBindGroups: 4
maxBindGroupsPlusVertexBuffers: 24
maxBindingsPerBindGroup: 1000
maxDynamicUniformBuffersPerPipelineLayout: 10
maxDynamicStorageBuffersPerPipelineLayout: 8
maxSampledTexturesPerShaderStage: 16
maxSamplersPerShaderStage: 16
maxStorageBuffersPerShaderStage: 10
maxStorageTexturesPerShaderStage: 8
maxUniformBuffersPerShaderStage: 12
maxUniformBufferBindingSize: 65536
maxStorageBufferBindingSize: 2147483644
minUniformBufferOffsetAlignment: 256
minStorageBufferOffsetAlignment: 256
maxVertexBuffers: 8
maxBufferSize: 2147483648
maxVertexAttributes: 16
maxVertexBufferArrayStride: 2048
maxInterStageShaderComponents: 112
maxInterStageShaderVariables: 28
maxColorAttachments: 8
maxColorAttachmentBytesPerSample: 128
maxComputeWorkgroupStorageSize: 32768
maxComputeInvocationsPerWorkgroup: 1024
maxComputeWorkgroupSizeX: 1024
maxComputeWorkgroupSizeY: 1024
maxComputeWorkgroupSizeZ: 64
maxComputeWorkgroupsPerDimension: 65535
Deno:
maxTextureDimension1D: 16384,
maxTextureDimension2D: 16384,
maxTextureDimension3D: 2048,
maxTextureArrayLayers: 2048,
maxBindGroups: 8,
maxBindingsPerBindGroup: 65535,
maxBufferSize: 2147483647,
maxDynamicUniformBuffersPerPipelineLayout: 12,
maxDynamicStorageBuffersPerPipelineLayout: 0,
maxSampledTexturesPerShaderStage: 16,
maxSamplersPerShaderStage: 16,
maxStorageBuffersPerShaderStage: 0,
maxStorageTexturesPerShaderStage: 0,
maxUniformBuffersPerShaderStage: 12,
maxUniformBufferBindingSize: 65536,
maxStorageBufferBindingSize: 0,
minUniformBufferOffsetAlignment: 256,
minStorageBufferOffsetAlignment: 256,
maxVertexBuffers: 16,
maxVertexAttributes: 16,
maxVertexBufferArrayStride: 4294967295,
maxInterStageShaderComponents: 124,
maxComputeWorkgroupStorageSize: 0,
maxComputeInvocationsPerWorkgroup: 0,
maxComputeWorkgroupSizeX: 0,
maxComputeWorkgroupSizeY: 0,
maxComputeWorkgroupSizeZ: 0,
maxComputeWorkgroupsPerDimension: 0
Edge:
maxTextureDimension1D: 16384
maxTextureDimension2D: 16384
maxTextureDimension3D: 2048
maxTextureArrayLayers: 2048
maxBindGroups: 4
maxBindGroupsPlusVertexBuffers: 24
maxBindingsPerBindGroup: 1000
maxDynamicUniformBuffersPerPipelineLayout: 10
maxDynamicStorageBuffersPerPipelineLayout: 8
maxSampledTexturesPerShaderStage: 16
maxSamplersPerShaderStage: 16
maxStorageBuffersPerShaderStage: 10
maxStorageTexturesPerShaderStage: 8
maxUniformBuffersPerShaderStage: 12
maxUniformBufferBindingSize: 65536
maxStorageBufferBindingSize: 2147483644
minUniformBufferOffsetAlignment: 256
minStorageBufferOffsetAlignment: 256
maxVertexBuffers: 8
maxBufferSize: 2147483648
maxVertexAttributes: 16
maxVertexBufferArrayStride: 2048
maxInterStageShaderComponents: 112
maxInterStageShaderVariables: 28
maxColorAttachments: 8
maxColorAttachmentBytesPerSample: 128
maxComputeWorkgroupStorageSize: 32768
maxComputeInvocationsPerWorkgroup: 1024
maxComputeWorkgroupSizeX: 1024
maxComputeWorkgroupSizeY: 1024
maxComputeWorkgroupSizeZ: 64
maxComputeWorkgroupsPerDimension: 65535
Version: Deno 1.39.4
The code below works in Deno with an earlier
tfjs-webgpu-backend
version (seeimport_map.json
here), but I raised the tfjs version numbers to4.16.0
as shown below, and that produces the error logs below. I'm guessing that this is because newer versions of tf.js have started using BigInts, and Deno hasn't implemented some WebGPU<-->BigInt stuff.I've confirmed that the code below works fine on Chrome (Windows).
deno.json
import_map.json
main.js
Error Logs