Open peacefulotter opened 9 months ago
Hi, @peacefulotter
We appreciate your effort in highlighting this issue. Upon reviewing the error message, it appears that the UnsortedSegmentSum
kernel functionality in the WebAssembly (wasm) backend of TensorFlow.js
is presently not supported. As you noted, the code functions as expected on alternative backends such as CPU
, WebGL
, or WebGPU
.
As of now, we will categorize this issue as a feature request to potentially include support for UnsortedSegmentSum
within the wasm backend if possible. Thank you for bringing this to our attention.
Hi @gaikwadrahul8 ,
Thanks for the response, hopefully this is supported soon!
Could you pin-point what calls this UnsortedSegmentSum
kernel in my case? I would like to find a workaround.
Thanks again
System information
Describe the current behavior Using the
wasm
backend fails and throws: Kernel 'UnsortedSegmentSum' not registered for backend 'wasm'.Describe the expected behavior No error
Standalone code to reproduce the issue The reproducible code I can provide consists of a NextJS app, running gpt-tfjs. Code has been tested under the cpu, webgl and webgpu backend and for these, it works. Moreover, I could not reproduce the error with a small amount of code - I don't know where the error is coming from. The stacktrace indicates that the error originates from AdamOptimizer but my testings on a dummy model and dataset work using
tf.adam.AdamW
work..Create a NextJS app and install tfjs
Since training runs in the browser, create an API route that will serve the ASM files from the
@tensorflow/tfjs-backend-wasm
package:And now in the client:
Other info / logs Include any logs or source code that would be helpful to If you wish I can include the code for
makeReadableByteFileStream
called in the api route. Here is the entire stacktrace:Thank you very much, any help is appreciated, even the slightest! :pray: