tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

[wasm] add the default dtype for tf.fill (#5656)

Open tiandeyu-cs opened this issue 4 years ago • 4 comments

Fix the bug #5656


This change is Reviewable

tiandeyu-cs avatar Sep 23 '21 15:09 tiandeyu-cs

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Sep 23 '21 15:09 google-cla[bot]

@googlebot I signed it!

tiandeyu-cs avatar Sep 23 '21 15:09 tiandeyu-cs

I'm willing to help, but I do not understand the meaning of the test file, and I do not know how to actually run these tests.

Do you have any introduction or tutorial resources that can help me to understand the test configuration? Thank you😄

tiandeyu-cs avatar Oct 02 '21 05:10 tiandeyu-cs

Hi @tiandeyu-github, thank you! For this, you need to add {startsWith: 'fill '}, (note the extra space after "fill") to the end of the TEST_FILTERS array here. This will ask the WASM backend to run tests whose names start with "fill " which are defined here.

@@ -433,6 +433,7 @@ const TEST_FILTERS: TestFilter[] = [
   {include: 'image.transform'},
   {include: 'batchToSpaceND'},
   {include: 'spaceToBatchND'},
+  {startsWith: 'fill '},
 ];

After that, under the tfjs-backend-wasm directory, run:

$ yarn
$ yarn test

This should eventually start a chrome which will run all the wasm tests. I tried it in the master branch and it complains about Unknown dtype undefined in all the "fill" tests, which should be fixed by your PR.

(If running tests locally on your machine doesn't work due to certain environment setup issues, you could also try pushing it here and check on the cloud build result)

Please give it a try and let me know any problems. Thanks!

jinjingforever avatar Oct 04 '21 17:10 jinjingforever