- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to write code by VNNI
There is a data type - __m512i
which I think is mapping to registers on CPU.
I'd like to locate an array of registers
Here is the code
#include <immintrin.h> int main() { const int size = 5; __m512i zero[size]; for(int i=0; i<size; i++) { zero = _mm512_setzero_si512(); } return 0; }
It works.
But when I try dynamic allocate memory
It doesn't work
#include <immintrin.h> int main() { const int size = 5; __m512i *zero = new __m512i[size]; for(int i=0; i<size; i++) { zero = _mm512_setzero_si512(); } delete [] zero; return 0; }
Is there any way to create registers dynamically?
Lot of thanks
BR,
chiungliang
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chiungliang
We are forwarding your case to SME to check.
Arun Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there any update?
chiungliang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Before we dive into this intrinsic question, can you explain why you mention VNNI here?
the intrinsic call may not involve VNNI instruction like vpdpbusd.
For VNNI intrinsic function, you can refer below wiki for detail.
https://en.wikichip.org/wiki/x86/avx512vnni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried to do MAC operation, and the first step is to reset registers.
Here is the code of the first step only.
Since I want to introduce "batch", which is defined as "the number of reused time", in my code.
I'd like to allocate registers dynamically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi chiungliang
sorry for late response.
this question is more related to general compiler issue, and it would be better to let our compiler experts to answer this question.
This forum can help on DL libraries and framework related questions, but you should get better support for intrinsic programming in compiler forum.
Would you mind posting the same question in below forum?
https://software.intel.com/en-us/forums/intel-c-compiler
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I have posted the question in the forum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Closing this case as it is adressed in intel-c-compiler forum. Link to question is given below
https://software.intel.com/en-us/forums/intel-c-compiler/topic/849942
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page