Skip to content

[WASM] Some supported ops in wasm backend are not available #2649

@akineeic

Description

@akineeic

Hello,
I have encountered some issues while using the tfjs-backend-wasm package, some infos are as follows:

TensorFlow.js version

  • @tensorflow/tfjs-core@1.4.0

  • @tensorflow/tfjs-backend-wasm@1.5.1-alpha5

Browser version

  • Google Chrome: 79.0.3945.79 (Official Build) (64-bit)

Describe the problem or feature request

Since 'Softmax' is not supported in wasm backend, I want to simulate a sample softmax function with ops 'Exp', 'Sum' and 'Div'. But when I try it with the guidance of webpack and test in chrome's inspect, the following error occured.
tfjs-wasm-issue

Code to reproduce the bug / link to feature request

I used the code in the folder tfjs/tfjs-backend-wasm/starter/webpack, and I upgrade the package '@tensorflow/tfjs-backend-wasm' to version:1.5.1-alpha5 since I can't set the backend to 'wasm' while using the version in the 'yarn.lock'.

To reproduce the error, just change the code to the usage of other kernel like 'exp' or 'sum' like the followings:
const x = tf.tensor1d([1, 2, 3]);
x.sum().print(); // or tf.sum(x)

Then use commend yarn build & yarn watch to run the code in browser and the error occured. It seems like caused by the build or registry process or maybe I make some mistake in the usage. So I'm wondering are there any strategy to fix the issue?

Thanks.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions