- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to write a simple program, but for some reason the compiler cannot find sinf16. My really simple test program is
#include <mathimf.h>
int main()
{
_Float16 a;
a = sinf16(1);
}
Using oneapi 2024.1.0 I try to build it with ICX but get an error that sinf16 is undeclared in spite of the fact it is defined in mathimf
What am I missing here?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, turns out this function is only valid for avx512fp16 architectures
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, turns out this function is only valid for avx512fp16 architectures
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, will get "illegal instruction" if executed on non-support hardware.
$ icx t4.c -D__AVX512FP16__ &&./a.out
Illegal instruction (core dumped)
$ cat t4.c
#include <mathimf.h>
#include<stdio.h>
int main()
{
_Float16 a;
a = sinf16(1);
printf ("a is %f\n",(float)a);
return 0;
}

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page