tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

Added files for mod kernel

Open carrycooldude opened this issue 4 years ago • 8 comments

I made a P.R for mod kernel and solves this issue #5110

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

carrycooldude avatar Jul 12 '21 19:07 carrycooldude

Build failed due to formatting/lint error, not related to xnnpack (google/XNNPACK#1613) I think. You can see it on the build log.

raffizulvian avatar Jul 28 '21 09:07 raffizulvian

Build failed due to formatting/lint error, not related to xnnpack (google/XNNPACK#1613) I think. You can see it on the build log.

Can you tell me how to resolve lint error

carrycooldude avatar Jul 28 '21 09:07 carrycooldude

You can just look at the build log or run yarn run lint locally inside tfjs-backend-wasm directory. This command will output the log contain information of which line causes the error and what action is needed to fix the error.

raffizulvian avatar Jul 28 '21 09:07 raffizulvian

Screenshot from 2021-07-28 17-54-07 Screenshot from 2021-07-28 17-54-01 Still I think so there is some logic error after I resolve lint error

carrycooldude avatar Jul 28 '21 12:07 carrycooldude

binary_f32(a_id, b_id, out_id,
                 [ ](float a, float b) {
                   float mod = fmod(a, b);
                   if ((a < 0 && b < 0) || (a >= 0 && b >= 0)) {
                     return mod;
                   } else {
                     return fmod((mod+b)  , b);
                   }
                  }); 

This is the logic which I am applying for that

carrycooldude avatar Jul 28 '21 15:07 carrycooldude

any updates on this one?

vladmandic avatar Aug 31 '21 17:08 vladmandic

any updates on this one?

I also have a conversation with xnnpack repo moderator too for this mod kernel is not supporting https://github.com/google/XNNPACK/pull/1613

carrycooldude avatar Aug 31 '21 21:08 carrycooldude

Can you implement mod kernel in TFJS first? I guess it would take long to implement in XNNPACK.

kon72 avatar Sep 12 '21 13:09 kon72

WASM implementation has been added through #4236 and #7670 . Please let me know if you run into other issues with this op, and thanks for your contributions!

chunnienc avatar May 15 '23 20:05 chunnienc