Intel® oneAPI Base Toolkit
Support for the core tools and libraries within the base toolkit that are used to build and deploy high-performance data-centric applications.
417 Discussions

Flags support to control floating-point calculations when using OneAPI via DevCloud

clicia
New Contributor I
1,804 Views

Dear all,

We have faced a problem when using dpct (available on DevCloud) regarding the use of some flags. We are using the following flags to compile the cuda code: --ftz, --prec-div, and --fmad. I tried to find equivalent flags for dpc++ code, but without success.

Some C++ documentation indicates the possibility of using the -ftz, -prec-div, and -fma flags, however, we see the following error when trying to include it in the compilation:
dpcpp: error: unknown argument: '-ftz'
dpcpp: error: unknown argument: '-prec-div'

Are there any suggestions on finding these flags for dpc++ code using dpcpp? Support for these flags does exist on OneAPI via DevCloud?

Thank you all.

0 Kudos
6 Replies
GouthamK_Intel
Moderator
1,780 Views

Hi Clicia,

Thanks for reaching out to us!

For --ftz flag please refer the below link for more information.

https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-reference/floating-point-operations/understanding-floating-point-operations/setting-the-ftz-and-daz-flags.html

Regarding other options, we are forwarding this thread to the Subject Matter Expert who will guide you with more information.

Have a Good day!


Thanks & Regards

Goutham


0 Kudos
clicia
New Contributor I
1,758 Views

Hi, Goutham

Thanks for your help with the -ftz flag. It works now. But we are still struggling to set -prec-div:

dpcpp: error: unknown argument: '-prec-div'

Remembering that I am logged in devcloud environment where I did some tests: When I compile a c++ program with icc the flag works fine. When I try to compile a dp.cpp program with the dpcpp compiler, this error appears.

Any help from Subject Matter Expert will be welcome.

 

Thank you again.

0 Kudos
IntelSupport
Community Manager
1,718 Views

with the command "dpcpp --help", there is no option "--prec-div​", and i checked the document https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-reference/floating-point-operations/understanding-ieee-floating-point-operations.html, there shows "This version of the compiler uses a close approximation to the IEEE Standard for Floating-Point Arithmetic, version IEEE 754-2008, unless otherwise stated."

I'm not sure if dpcpp support this option, and i will further confirm with compiler team.


0 Kudos
IntelSupport
Community Manager
1,708 Views

I use command "icx -qnextgen-diag" to show the ICC classic options that are not accepted by icx. I found that the option "-prec-div" is not available currenty, but we may support it in the future.


0 Kudos
Subarnarek_G_Intel
1,659 Views

Can you try using -freciprocal-math instead of -prec-div and see if it resolves your issue?


0 Kudos
Subarnarek_G_Intel
1,613 Views

Escalated this case to the Engineering! Still waiting for customer reply!


0 Kudos
Reply