AI Tools from Intel
Find answers to your toolkit installation, configuration, and get-started questions.

OneDNN DLL Init Memory Descriptor Crash

coco82
Beginner
1,986 Views

Hi,

 

I'm trying to use the OneDNN dll from "C:\Program Files (x86)\Intel\oneAPI\dnnl\2022.1.0\cpu_iomp\bin".

I managed to call the first functions of creation of an engine "dnnl_engine_create(dnnl_engine_t *engine, dnnl_engine_kind_t kind, size_t index);" and to create a stream "dnnl_stream_create(dnnl_stream_t *stream, dnnl_engine_t engine, unsigned flags);".
However, when creating a memory descriptor with the function "dnnl_memory_desc_init_by_strides(dnnl_memory_desc_t *memory_desc, int ndims, const dnnl_dims_t dims,
dnnl_data_type_t data_type, const dnnl_dims_t strides);" my program crashes.

As for the values I send, here they are:
- ndims = 4
- dims = [1, 3, 13, 13]
- data_type = dnnl_f16 = 1
- strides = [507, 1, 39, 3]

 

If anyone has encountered this or similar problems with the OneDNN DLL, I would be really interested in a solution.
If you have any questions don't hesitate.
Thanks in advance

 

 

0 Kudos
1 Solution
coco82
Beginner
1,919 Views

Hi, 

 

Thanks for your answer, i totally forgot to reply because i found the solution for my problem.

 

The problem came from my use of the function dnnl_memory_desc_init_by_strides, I thought that the function returned the memory_desc and took care of reserving the memory according to the parameters however it is not the case, it is necessary to send in entry a ptr with a memory space sufficient to store the data.

View solution in original post

0 Kudos
4 Replies
Rahila_T_Intel
Employee
1,960 Views

Hi,


Thank you for posting in Intel Communities. 


Please can you answer the below questions:


1. Which oneAPI toolkit are you using in order to access oneDNN library? Is it Intel oneAPI Base Toolkit or Intel oneAPI DL Framework Developer Toolkit?


2. What is the version of that toolkit?


3. Please can you share the exact steps your tried in order so that we can reproduce the issue?



Thank You.


0 Kudos
Rahila_T_Intel
Employee
1,931 Views

Hi,

 

We have not heard back from you. Please could you give us an update?

 

Thank You.


0 Kudos
coco82
Beginner
1,920 Views

Hi, 

 

Thanks for your answer, i totally forgot to reply because i found the solution for my problem.

 

The problem came from my use of the function dnnl_memory_desc_init_by_strides, I thought that the function returned the memory_desc and took care of reserving the memory according to the parameters however it is not the case, it is necessary to send in entry a ptr with a memory space sufficient to store the data.

0 Kudos
Rahila_T_Intel
Employee
1,911 Views

Hi,


Glad to know that your issue is resolved. Thanks for sharing the solution with us.


If you need any additional information, please post a new question as this thread will no longer be monitored by Intel. 


Thanks


0 Kudos
Reply