Skip to content

Commit 8137aea

Browse files
committed
Fixed slow numeric drift issues
1 parent 9e5ba50 commit 8137aea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/opencl.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class Device {
185185
const string kernel_code = enable_device_capabilities()+"\n"+opencl_c_code;
186186
cl_source.push_back({ kernel_code.c_str(), kernel_code.length() });
187187
this->cl_program = cl::Program(info.cl_context, cl_source);
188-
const string build_options = string("-cl-fast-relaxed-math")+(info.intel_gpu_above_4gb_patch ? " -cl-intel-greater-than-4GB-buffer-required" : "");
188+
const string build_options = string("-cl-finite-math-only -cl-no-signed-zeros -cl-mad-enable")+(info.intel_gpu_above_4gb_patch ? " -cl-intel-greater-than-4GB-buffer-required" : "");
189189
#ifndef LOG
190190
int error = cl_program.build({ info.cl_device }, (build_options+" -w").c_str()); // compile OpenCL C code, disable warnings
191191
if(error) print_warning(cl_program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(info.cl_device)); // print build log

0 commit comments

Comments
 (0)