Skip to content
This repository was archived by the owner on Jul 30, 2026. It is now read-only.
This repository was archived by the owner on Jul 30, 2026. It is now read-only.

requesting a tfjs webgpu example #22

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')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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