Intel® oneAPI Base Toolkit
Support for core tools and libraries to build and deploy high-performance data-centric applications
319 Discussions

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

clicia
New Contributor I
1,041 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,017 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-gui...

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


clicia
New Contributor I
995 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.

IntelSupport
Community Manager
955 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-gui..., 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.


IntelSupport
Community Manager
945 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.


Subarnarek_G_Intel
896 Views

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


Subarnarek_G_Intel
850 Views

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


Reply