question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebGL CPU forwarding failed for slice op

See original GitHub issue

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
  • TensorFlow.js installed from (npm or script link): both
  • TensorFlow.js version (use command below): 2.5.0
  • Browser version:
  • Tensorflow.js Converter Version: 2.5.0

Describe the current behavior WebGL CPU forward failed to slice op, caused by CPU slice op has been modularized.

backend.ts:665 Uncaught (in promise) Error: 'slice' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen
    at notYetImplemented (backend.ts:665)
    at MathBackendCPU.KernelBackend.slice (backend.ts:145)
    at MathBackendWebGL.slice (backend_webgl.ts:731)
    at forward (slice.ts:75)
    at engine.ts:625

The current work-around is to disable CPU forwarding:

tf.env().set('WEBGPU_CPU_FORWARD', false);

Describe the expected behavior In 2.4.0 the CPU forwarding of slice op is not failing.

Standalone code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/CodePen/any notebook.

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
lina128commented, Oct 8, 2020

We published 2.6.0 today, it should fix the problem by now.

1reaction
mtuan4icommented, Oct 7, 2020

I got the same error. I tried tf.env().set('WEBGPU_CPU_FORWARD', false); but it doesn’t work. However, tf.env().set('WEBGL_CPU_FORWARD', false); does

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in running executeAsync - Google Groups
I have created a SSD model with object detection api. I used tensorflowjs to convert the model and loaded it in tensorflowjs. I...
Read more >
Tensorflow js: Your application contains ops that are small ...
If i try to add it to my project, I see a lot of warnings about that CPU backend is already registered. Is...
Read more >
WebGL 2.0 Specification - Khronos Registry
If drawing buffer creation failed, perform the following steps: Fire a WebGL context creation error at canvas. Return null and terminate these ...
Read more >
WebGPU — All of the cores, none of the canvas - surma.dev
I often found myself staring at a black canvas (as that's pretty much all you get in terms of error reporting in WebGL)...
Read more >
UNPKG - @tensorflow/tfjs
node_modules/@tensorflow/tfjs-core/src/ops/slice.ts",". ... boolean;\n // Whether the WebGL backend will sometimes forward ops to the CPU.
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