-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented CPU plugin just-in-time emitter for SoftPlus operation. #28752
base: master
Are you sure you want to change the base?
Conversation
h->fexp(aux1.s, src.s); | ||
h->ld1r(aux2.s, table_val2("one")); | ||
h->fadd(aux1.s, aux1.s, aux2.s); | ||
h->flog(dst.s, aux1.s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I remember, you told that you have problems with test launching using qemu (but as we agreed, I don't see comments with asking help with your problem in your GFI).
But anyway do you have a chance to validate this implementation? I didn't find the instructions in fexp
or flog
in AArch64 manual.
Exp can be calculated used jit_exp_emitter
(please see the Sigmoid
emitter implementation, this emitter needs to calculate exp too).
As for log
, it can be calculated using approximation. Please take a look at oneDNN impl. But it's implemented using SVE. You can try to rewrite it using NEON with the same math underneath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Ma'am
I realised that this was the PR which I created after talking with you realted to launching the tests issue. Hence I thought to refactor the code after getting your review and then ask in the comments for asking help on the tests.
@@ -57,6 +57,7 @@ bool JitEltwiseExecutor::isSupported(const Algorithm& algorithm, | |||
Algorithm::EltwiseRoundHalfAwayFromZero, | |||
Algorithm::EltwiseRoundHalfToEven, | |||
Algorithm::EltwiseSelect, | |||
Algorithm::EltwiseSoftPlus, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like EltwiseSoftPlus
is missed in Algorithm
enum.
Please see the example how Negative
was added to Eltwise
op
@a-sidorova I have done the changes according to the comments made. Please let me know what all more changes are needed to be done further. Thanks and Regards. |
@geeky33 if contributor asks to review, I assume that the contributor is sure that code is correct and works. And I may spend my time on review. Otherwise, contributor should ask help with the code. I already left the comment with helpful links and hints how to implement As for testing and emulator problems, I asked you to leave comment in the issue with asking help with faced problem. I still don't see this comment with problem description and your steps for reproduction. |
Greetings once again. Now, since launching the tests was an issue to me Here are the steps I followed for NotEqual JIT Emitter
Till here everythhing went superbly fine I have ran the build cmd again after deleting the dir ran this cmd and also followed your instructions even after subsequent tries I can see that the build is completed with 100% even after that I am not able to launch the relevant testcases. |
Extremely sorry for the issue being caused: Before making any changes,
To validate my this implementation: |
@geeky33 First of all, I suggest to fix your problem with qemu. As I can see in your previous screenshot, you have the same problem when you try to execute even simple Then let's do so: when you are sure in your implementation, launch all needed tests for Also, I asked my colleagues if someone of them faced with the same problem in launching tests with qemu, but no one see it in his environment. So I think that firstly you need to spend some time on googling if you want to launch tests with emulator :) |
@a-sidorova Thank you for the feedback Still whatever could be the done I will look into it as well! :) |
Details:
Add ARM64 JIT emitter implementation for SoftPlus operation (ln(1 + exp(x))) with fp32 support.
No breaking changes. Requires ARM64 platform with NEON SIMD support.
@eshoguli
@dmitry-gorokhov
@a-sidorova
@p-wysocki
Tickets: