Skip to content

requesting a tfjs webgpu example #22

@andykais

Description

@andykais

can you add an example to the repo on how we can use tfjs webgpu in deno? I have been struggling with the following for a while:

import * as tf from '@tensorflow/tfjs-core';
import '@tensorflow/tfjs-backend-webgpu';
await tf.setBackend('webgpu')

It gives errors like this back:

Initialization of backend webgpu failed
TypeError: Failed to execute 'call' on 'GPUAdapter': 'requiredFeatures' of 'GPUDeviceDescriptor' (Argument 2), index 1 can not be converted to a enum

I know I am roughly on the right track though because this works:

import * as tf from '@tensorflow/tfjs-core';
import '@tensorflow/tfjs-backend-cpu';
await tf.setBackend('cpu')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions