-
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
[ARM]: Implement CPU plugin just-in-time emitter for Erf operation #27499 #28176
base: master
Are you sure you want to change the base?
Conversation
const TReg src(in_vec_idxs[0]); | ||
const TReg dst(out_vec_idxs[0]); | ||
|
||
h->erf(dst.s, src.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.
I saw your comment with asking help about erf impl (but seems like it was deleted).
You can take a look on JIT Emitter for GeluErf for AArch64 platforms. There is Erf impl
Also, we have JIT Emitter for Erf for x64 platforms. Please take a look - it might be useful.
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.
Yeah I checked out the ERF approximation and also the ERF documentation in general. I assume that we have to use the approximation formula to implement ERF. Also can I directly use the same idea from the JIT Emitter for ERF for x64 and then port accordingly for AArch64?
Also, I work on a windows laptop, are there any steps to test this on windows? Sorry for the dumb doubts
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.
Also can I directly use the same idea from the JIT Emitter for ERF for x64 and then port accordingly for AArch64?
For sure! It makes sense 😃
Also, I work on a windows laptop, are there any steps to test this on windows? Sorry for the dumb doubts
I'd assume that your laptop is on x64 arch (intel or amd). In this case you need emulator to launch programs for arm64. But to be honest, I don't know any good options to do it on windows.
I know only one option with WSL - there you can use cross-compilation and launch programs with QEMU.
Sorry for the dumb doubts
No worries, everything is ok! 👍🏼
@a-sidorova Could take a look at it once? Thanks |
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.
Also could you please update test instances? Please take a look at the last paragraph in the section "What needs to be done?" in the ticket #27499.
Then please locally launch tests using the section "Tests".
h->mov(dst.b16, vmm_aux3.b16); | ||
} | ||
|
||
void jit_erf_emitter::emit_data() const { |
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.
If the method impl of derived class is the same as of base class and this method is virtual in base class - no need to override this method.
However, you use exp_emitter
in the impl of erf_emitter
. So you need to emit data for exp_emitter
in this method too:
void jit_erf_emitter::emit_data() const {
jit_emitter::emit_data();
exp_emitter->emit_data();
}
Otherwise, exp_emitter
cannot find the constant values in the table.
I believe that if we add exp_emitter->emit_data();
, failed GHA jobs with the following error messages will be fixed:
[ RUN ] smoke_Activation_Basic/ActivationLayerTest.Inference/IS=([])_TS={(1.50)}_TS=()_Erf_constants_value=()_netPRC=f32_trgDev=CPU
bad err=4 in Xbyak::Error
MEM_USAGE=1972392KB
src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp:97: Failure
Exception from src/inference/src/cpp/core.cpp:109:
Exception from src/inference/src/dev/plugin.cpp:53:
label is not found
[ FAILED ] smoke_Activation_Basic/ActivationLayerTest.Inference/IS=([])_TS={(1.50)}_TS=()_Erf_constants_value=()_netPRC=f32_trgDev=CPU, where GetParam() = ((26, {}), f32, ({ ({}, { { 1, 50 } }) }, {}), "CPU") (46 ms)
Sure adding the tests right now |
@a-sidorova Just to be sure, I need to update the SetUp() to use the ERF operation instead of the current GELU ERF operation right? |
Details:
Tickets:
#27499