if (USE_LLVM_BITCODE)
LLVM_COMPILE ( llvm_ops.cpp liboslexec_srcs )
# Optionally repeat the bitcode compilation with CUDA-specific options
if (CUDA_FOUND)
ADD_DEFINITIONS (-DOSL_LLVM_CUDA_BITCODE)
CUDA_SHADEOPS_COMPILE ( liboslexec_srcs )
endif ()
else ()
# With MSVC/Mingw, we don't compile llvm_ops.cpp to LLVM bitcode, due
# to clang being unable to compile MSVC C++ header files at this time.
# Instead it is part of the regular build process.
ADD_DEFINITIONS (-DOSL_LLVM_NO_BITCODE)
SET (liboslexec_srcs ${liboslexec_srcs} llvm_ops.cpp)
endif ()if USE_LLVM_BITCODE must be activated and does not work for MSVC?USE_LLVM_BITCODE is not set to 1:###########################################################################
# OptiX setup
if (USE_OPTIX)
find_package (OptiX 5.0 REQUIRED)
include_directories (BEFORE "${OPTIX_INCLUDE_DIR}")
if (NOT USE_LLVM_BITCODE OR NOT USE_FAST_MATH)
message (FATAL_ERROR "Enabling OptiX requires USE_LLVM_BITCODE=1 and USE_FAST_MATH=1")
endif ()
endif ()
# end OptiX setup
###########################################################################FYI, I generate VS2017 solution with this cmake command: |
SET CUDA_TOOLKIT_ROOT_DIR=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1
SET OPTIXHOME="C:/ProgramData/NVIDIA Corporation/OptiX SDK 6.5.0"
SET OSL_BUILD_SHADERS=1
SET OSL_BUILD_MATERIALX=0
SET LLVM_DIRECTORY=%PATH_TO_LLVM_9_0_0%
SET LLVM_STATIC=1
SET OPENEXR_ROOT_DIR=%PATH_TO_OPENEXR_2_2_0%
SET ILMBASE_ROOT_DIR=%PATH_TO_OPENEXR_2_2_0%
SET OPENIMAGEIO_ROOT_DIR=%PATH_TO_OIIO_2_0_9%
SET BOOST_HOME=%PATH_TO_BOOST_1_65_1%
SET USE_PARTIO=0
SET USE_QT=0
SET CUDA_ARCH=52
SET CUDA_TARGET_ARCH=sm_%CUDA_ARCH%
:: OptiX mandatory vars and values for OSL
SET USE_LLVM_BITCODE=1
SET USE_FAST_MATH=1
SET USE_OPTIX=1
:: Init MY_CMAKE_FLAGS
SET MY_CMAKE_FLAGS=
:: Append other flags to MY_CMAKE_FLAGS
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DOSL_BUILD_SHADERS:BOOL=%OSL_BUILD_SHADERS%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DOSL_BUILD_MATERIALX:BOOL=%OSL_BUILD_MATERIALX%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DLLVM_DIRECTORY:STRING=%LLVM_DIRECTORY%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DLLVM_STATIC:BOOL=%LLVM_STATIC%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DOPENEXR_ROOT_DIR:STRING=%OPENEXR_ROOT_DIR%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DILMBASE_ROOT_DIR:STRING=%ILMBASE_ROOT_DIR%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DOPENIMAGEIO_ROOT_DIR:STRING=%OPENIMAGEIO_ROOT_DIR%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DBOOST_HOME:STRING=%BOOST_HOME%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DUSE_PARTIO:BOOL=%USE_PARTIO%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DUSE_QT:BOOL=%USE_QT%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DCUDA_ARCH:STRING=%CUDA_ARCH%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DCUDA_TARGET_ARCH:STRING=%CUDA_TARGET_ARCH%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DUSE_LLVM_BITCODE:BOOL=%USE_LLVM_BITCODE%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DUSE_FAST_MATH:BOOL=%USE_FAST_MATH%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DUSE_OPTIX:BOOL=%USE_OPTIX%
SET MY_CMAKE_FLAGS=%MY_CMAKE_FLAGS% -DOPTIXHOME:STRING=%OPTIXHOME%
cd %OSL_SOURCE_TREE%
cmake -E make_directory %WIN64_OSL_INSTALL_OUTSIDE_ROOT_PATH%
cd /D %WIN64_OSL_INSTALL_OUTSIDE_ROOT_PATH%
cmake -G "Visual Studio 15 2017 Win64" -DVERBOSE:BOOL=1 -DCMAKE_INSTALL_PREFIX=%WIN64_OSL_INSTALL_RELEASE_PATH% %MY_CMAKE_FLAGS% -DBOOST_ROOT=%BOOST_HOME% %OSL_SOURCE_TREE%
[..]
1>Generating opnoise_cuda.bc
1>In file included from opnoise.cpp:31:
1>In file included from D:/GitRepos/osl/src/liboslexec/oslexec_pvt.h:40:
1>In file included from D:/OslDeps/include/boost-1_65_1\boost/thread/tss.hpp:8:
1>In file included from D:/OslDeps/include/boost-1_65_1\boost/thread/detail/config.hpp:11:
1>In file included from D:/OslDeps/include/boost-1_65_1\boost/config.hpp:39:
1>D:/OslDeps/include/boost-1_65_1\boost/config/compiler/visualc.hpp(334,14): warning G4EB135E8: Unknown compiler version - please run the configure tests and report the results [-W#pragma-messages]
1># pragma message("Unknown compiler version - please run the configure tests and report the results")
1> ^
1>In file included from opnoise.cpp:31:
1>In file included from D:/GitRepos/osl/src/liboslexec/oslexec_pvt.h:40:
1>In file included from D:/OslDeps/include/boost-1_65_1\boost/thread/tss.hpp:8:
1>In file included from D:/OslDeps/include/boost-1_65_1\boost/thread/detail/config.hpp:13:
1>In file included from D:/OslDeps/include/boost-1_65_1\boost/thread/detail/platform.hpp:17:
1>D:/OslDeps/include/boost-1_65_1\boost/config/requires_threads.hpp(82,4): error G67F05DCB: "Compiler
threading support is not turned on. Please set the correct command line
options for threading: either /MT /MTd /MD or /MDd"
1>#
error "Compiler threading support is not turned on. Please set the
correct command line options for threading: either /MT /MTd /MD or /MDd"
1> ^
1>In file included from opnoise.cpp:31:
1>In file included from D:/GitRepos/osl/src/liboslexec/oslexec_pvt.h:40:
1>In file included from D:/OslDeps/include/boost-1_65_1\boost/thread/tss.hpp:8:
1>In file included from D:/OslDeps/include/boost-1_65_1\boost/thread/detail/config.hpp:465:
1>D:/OslDeps/include/boost-1_65_1\boost/config/auto_link.hpp(370,4): error G419390BC: "Mixing a dll boost library with a static runtime is a really bad idea..."
1># error "Mixing a dll boost library with a static runtime is a really bad idea..."
1> ^
1>D:/OslDeps/include/boost-1_65_1\boost/config/auto_link.hpp(408,4): error GB5FD6117: "some required macros where not defined (internal logic error)."
1># error "some required macros where not defined (internal logic error)."
1> ^
[..]
1>In file included from opnoise.cpp:31:
1>In file included from D:/GitRepos/osl/src/liboslexec/oslexec_pvt.h:44:
1>In file included from D:/GitRepos/osl/src/include\OSL/oslconfig.h:102:
1>In file included from D:/OslDeps/include\OpenImageIO/errorhandler.h:36:
1>In file included from D:/OslDeps/include\OpenImageIO/strutil.h:49:
1>In file included from D:/OslDeps/include\OpenImageIO/hash.h:49:
1>In file included from D:/OslDeps/include\OpenImageIO/span.h:18:
1>In file included from D:/OslDeps/include\OpenImageIO/dassert.h:37:
1>In file included from D:/OslDeps/include\OpenImageIO/platform.h:68:
1>In file included from C:\Program Files (x86)\Windows Kits\8.1\Include\um\windows.h:165:
1>In file included from C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h:48:
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\synchapi.h(535,1): error G8BE29D73: conflicting types for 'CreateMutexA'
1>CreateMutexA(
1>^
1>D:/OslDeps/include/boost-1_65_1\boost/thread/win32/thread_primitives.hpp:173:55: note: previous declaration is here
1> __declspec(dllimport) void* __stdcall CreateMutexA(_SECURITY_ATTRIBUTES*,int,char const*);
1> ^
[..)
1> ^
1>238 warnings and 10 errors generated when compiling for sm_52.
1>Done building project "oslexec.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
extra_clang_args to src\cmake\cuda_macros.cmake (see additional section in cmake code below).# Function to compile a C++ source file to CUDA-compatible LLVM bitcode
FUNCTION ( MAKE_CUDA_BITCODE src suffix generated_bc extra_clang_args )
[..]
# NEW: inject additional clang extra args for Windows
if (WIN32 AND ${LLVM_BC_GENERATOR} MATCHES ".*clang.*")
# https://clang.llvm.org/docs/MSVCCompatibility.html
# https://clang.llvm.org/docs/UsersManual.html#microsoft-extensions
set (extra_clang_args ${extra_clang_args} "-fms-extensions" "-fms-compatibility" "-fdelayed-template-parsing" "-fdeclspec" "-DBOOST_HAS_THREADS" "-D_DLL")
MESSAGE (STATUS "Using extra_clang_args = ${extra_clang_args} to generate bitcode.")
endif()
ADD_CUSTOM_COMMAND (OUTPUT ${bc_cuda}
COMMAND ${LLVM_BC_GENERATOR}
"-I${OPTIX_INCLUDE_DIR}"
cmake -G "Visual Studio 15 2017" -A x64 -T v141,version=14.11,host=x64 -DVERBOSE:BOOL=1 -DCMAKE_INSTALL_PREFIX=%WIN64_OSL_INSTALL_RELEASE_PATH% %MY_CMAKE_FLAGS% -DBOOST_ROOT=%BOOST_HOME% %OSL_SOURCE_TREE%set (extra_clang_args ${extra_clang_args} "-fms-extensions" "-fms-compatibility" "-fdelayed-template-parsing" "-fdeclspec" "-pthread" "-D_DLL")1>D:/OslDeps/include\OpenEXR/ImathExport.h:40:38: note: expanded from macro 'IMATH_EXPORT'
1> #define IMATH_EXPORT __declspec(dllimport)
1> ^
1>In file included from opnoise.cpp:31:
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\synchapi.h(590,1): error G8BE29D73: conflicting types for 'CreateEventA'
1>CreateEventA(
1>^
1>D:/OslDeps/include/boost-1_65_1\boost/thread/win32/thread_primitives.hpp:175:55: note: previous declaration is here
1> __declspec(dllimport) void* __stdcall CreateEventA(_SECURITY_ATTRIBUTES*,int,int,char const*);
1> ^
1>In file included from opnoise.cpp:31:
1>In file included from D:/GitRepos/osl/src/liboslexec/oslexec_pvt.h:44:
1>In file included from D:/GitRepos/osl/src/include\OSL/oslconfig.h:102:
1>In file included from D:/OslDeps/include\OpenImageIO/errorhandler.h:36:
1>In file included from D:/OslDeps/include\OpenImageIO/strutil.h:49:
1>In file included from D:/OslDeps/include\OpenImageIO/hash.h:49:
1>In file included from D:/OslDeps/include\OpenImageIO/span.h:18:
1>In file included from D:/OslDeps/include\OpenImageIO/dassert.h:37:
1>In file included from D:/OslDeps/include\OpenImageIO/platform.h:68:
1>In file included from C:\Program Files (x86)\Windows Kits\8.1\Include\um\windows.h:165:
1>In file included from C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h:58:
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\libloaderapi.h(276,1): error G6D63CA20: functions that differ only in their return type cannot be overloaded
1>GetModuleHandleA(
1>^
1>D:/OslDeps/include/boost-1_65_1\boost/thread/win32/thread_primitives.hpp:177:55: note: previous declaration is here
1> __declspec(dllimport) void* __stdcall GetModuleHandleA(char const*);
1> ^
1>In file included from opnoise.cpp:31:
1>In file included from D:/GitRepos/osl/src/liboslexec/oslexec_pvt.h:44:
1>In file included from D:/GitRepos/osl/src/include\OSL/oslconfig.h:102:
1>In file included from D:/OslDeps/include\OpenImageIO/errorhandler.h:36:
1>In file included from D:/OslDeps/include\OpenImageIO/strutil.h:49:
1>In file included from D:/OslDeps/include\OpenImageIO/hash.h:49:
1>In file included from D:/OslDeps/include\OpenImageIO/span.h:18:
1>In file included from D:/OslDeps/include\OpenImageIO/dassert.h:37:
1>In file included from D:/OslDeps/include\OpenImageIO/platform.h:68:
1>In file included from C:\Program Files (x86)\Windows Kits\8.1\Include\um\windows.h:165:
1>In file included from C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h:58:
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\libloaderapi.h(360,1): error G6D63CA20: functions that differ only in their return type cannot be overloaded
1>GetProcAddress(
1>^
1>D:/OslDeps/include/boost-1_65_1\boost/thread/win32/thread_primitives.hpp:197:59: note: previous declaration is here
1> __declspec(dllimport) farproc_t __stdcall GetProcAddress(void *, const char *);
1> ^
1>In file included from opnoise.cpp:31:
1>In file included from D:/GitRepos/osl/src/liboslexec/oslexec_pvt.h:44:
1>In file included from D:/GitRepos/osl/src/include\OSL/oslconfig.h:102:
1>In file included from D:/OslDeps/include\OpenImageIO/errorhandler.h:36:
1>In file included from D:/OslDeps/include\OpenImageIO/strutil.h:49:
1>In file included from D:/OslDeps/include\OpenImageIO/hash.h:49:
1>In file included from D:/OslDeps/include\OpenImageIO/span.h:18:
1>In file included from D:/OslDeps/include\OpenImageIO/dassert.h:37:
1>In file included from D:/OslDeps/include\OpenImageIO/platform.h:68:
1>In file included from C:\Program Files (x86)\Windows Kits\8.1\Include\um\windows.h:165:
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(3002,1): error G8BE29D73: conflicting types for 'CreateSemaphoreA'
1>CreateSemaphoreA(
1>^
1>D:/OslDeps/include/boost-1_65_1\boost/thread/win32/thread_primitives.hpp:174:55: note: previous declaration is here
1> __declspec(dllimport) void* __stdcall CreateSemaphoreA(_SECURITY_ATTRIBUTES*,long,long,char const*);
1> ^
set (extra_clang_args ${extra_clang_args} "-Wno-ignored-attributes" "-Wno-pragma-pack" "-DBOOST_USE_WINDOWS_H" "-pthread" "-D_DLL" "-DNOMINMAX")BOOST_USE_WINDOWS_H solves my remaining Windows header failures, thanks to this github boost issue.2>Generating opspline_cuda.bc
2>In file included from opspline.cpp:44:
2>In file included from D:/GitRepos/osl/src/liboslexec/oslexec_pvt.h:44:
2>In file included from D:/GitRepos/osl/src/include\OSL/oslconfig.h:102:
2>In file included from D:/OslDeps/include\OpenImageIO/errorhandler.h:36:
2>In file included from D:/OslDeps/include\OpenImageIO/strutil.h:49:
2>In file included from D:/OslDeps/include\OpenImageIO/hash.h:51:
2>D:/OslDeps/include\OpenImageIO/fmath.h(1891,9): error GEF7559A7: no matching function for call to 'fabs'
2> if (fabs(v0-v1) < eps) // already close enough
2> ^~~~
2>D:/GitRepos/osl/src/liboslexec/splineimpl.h:283:23: note: in instantiation of function template specialization 'OpenImageIO_v2_0::invert<OSL_v1_11::Dual<float, 2>, OSL_v1_11::pvt::Spline::SplineInterp::SplineFunctor<OSL_v1_11::Dual<float, 2>, OSL_v1_11::Dual<float, 2> > >' requested here
2> x = OIIO::invert (S, y, r0, r1, 32, YTYPE(1.0e-6), &brack);
2> ^
2>opspline.cpp:125:48: note: in instantiation of function template specialization 'OSL_v1_11::pvt::Spline::SplineInterp::inverse<OSL_v1_11::Dual<float, 2> >' requested here
2> Spline::SplineInterp::create(HDSTR(spline_)).inverse<Dual2<float> >
2> ^
2>D:/GitRepos/osl/src/include\OSL/dual.h:988:33: note: candidate function [with T = float, P = 2]
2>OSL_HOSTDEVICE inline Dual<T,P> fabs (const Dual<T,P> &x)
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\include\cmath:103:29: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'float' for 1st argument
2>_Check_return_ inline float fabs(_In_ float _Xx) _NOEXCEPT
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\include\cmath:397:35: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'long double' for 1st argument
2>_Check_return_ inline long double fabs(_In_ long double _Xx) _NOEXCEPT
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\include\xtgmath.h:83:16: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'double' for 1st argument
2>_GENERIC_MATH1(fabs, _CRT_JIT_INTRINSIC)
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\include\xtgmath.h:39:18: note: expanded from macro '_GENERIC_MATH1'
2> _GENERIC_MATH1R(FUN, double, CRTTYPE)
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\include\xtgmath.h:30:47: note: expanded from macro '_GENERIC_MATH1R'
2>extern "C" _Check_return_ CRTTYPE RET __cdecl FUN(_In_ double); \
2> ^
2>D:\llvm-9.0.0-win.x64\lib\clang\9.0.0\include\__clang_cuda_device_functions.h:1487:19: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'double' for 1st argument
2>__DEVICE__ double fabs(double __a) __NOEXCEPT { return __nv_fabs(__a); }
2> ^
2>D:\llvm-9.0.0-win.x64\lib\clang\9.0.0\include\__clang_cuda_cmath.h:67:18: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'float' for 1st argument
2>__DEVICE__ float fabs(float __x) __NOEXCEPT { return ::fabsf(__x); }
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\include\xtgmath.h:83:16: note: candidate template ignored: requirement '::std::is_integral<OSL_v1_11::Dual<float, 2> >::value' was not satisfied [with _Ty = OSL_v1_11::Dual<float, 2>]
2>_GENERIC_MATH1(fabs, _CRT_JIT_INTRINSIC)
2> ^
2>D:\llvm-9.0.0-win.x64\lib\clang\9.0.0\include\__clang_cuda_cmath.h:229:44: note: candidate template ignored: substitution failure [with __T = OSL_v1_11::Dual<float, 2>]: no type named 'type' in '__clang_cuda_enable_if<false, double>'
2>__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, fabs)
2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
2>D:\llvm-9.0.0-win.x64\lib\clang\9.0.0\include\__clang_cuda_cmath.h:193:7: note: expanded from macro '__CUDA_CLANG_FN_INTEGER_OVERLOAD_1'
2> __fn(__T __x) { \
2> ^
--
You received this message because you are subscribed to the Google Groups "OSL Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osl-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osl-dev/ea2e2060-259f-44d6-a424-5cf4663c589b%40googlegroups.com.
2>In file included from opspline.cpp:44:
2>In file included from D:/GitRepos/osl/src/liboslexec/oslexec_pvt.h:44:
2>In file included from D:/GitRepos/osl/src/include\OSL/oslconfig.h:102:
2>In file included from D:/OslDeps/include\OpenImageIO/errorhandler.h:10:
2>In file included from D:/OslDeps/include\OpenImageIO/strutil.h:23:
2>In file included from D:/OslDeps/include\OpenImageIO/hash.h:25:
2>D:/OslDeps/include\OpenImageIO/fmath.h(2067,9): error GEF7559A7: no matching function for call to 'fabs'
2> if (fabs(v0-v1) < eps) // already close enough
2> ^~~~
2>D:/GitRepos/osl/src/liboslexec/splineimpl.h:283:23: note: in instantiation of function template specialization 'OpenImageIO_v2_1::invert<OSL_v1_11::Dual<float, 2>, OSL_v1_11::pvt::Spline::SplineInterp::SplineFunctor<OSL_v1_11::Dual<float, 2>, OSL_v1_11::Dual<float, 2> > >' requested here
2> x = OIIO::invert (S, y, r0, r1, 32, YTYPE(1.0e-6), &brack);
2> ^
2>opspline.cpp:125:48: note: in instantiation of function template specialization 'OSL_v1_11::pvt::Spline::SplineInterp::inverse<OSL_v1_11::Dual<float, 2> >' requested here
2> Spline::SplineInterp::create(HDSTR(spline_)).inverse<Dual2<float> >
2> ^
2>D:/GitRepos/osl/src/include\OSL/dual.h:988:33: note: candidate function [with T = float, P = 2]
2>OSL_HOSTDEVICE inline Dual<T,P> fabs (const Dual<T,P> &x)
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\cmath:111:29: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'float' for 1st argument
2>_Check_return_ inline float fabs(_In_ float _Xx) noexcept
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\cmath:405:35: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'long double' for 1st argument
2>_Check_return_ inline long double fabs(_In_ long double _Xx) noexcept
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\xtgmath.h:85:16: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'double' for 1st argument
2>_GENERIC_MATH1(fabs, _CRT_JIT_INTRINSIC)
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\xtgmath.h:41:18: note: expanded from macro '_GENERIC_MATH1'
2> _GENERIC_MATH1R(FUN, double, CRTTYPE)
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\xtgmath.h:32:47: note: expanded from macro '_GENERIC_MATH1R'
2>extern "C" _Check_return_ CRTTYPE RET __cdecl FUN(_In_ double); \
2> ^
2>D:\llvm-9.0.0-win.x64\lib\clang\9.0.0\include\__clang_cuda_device_functions.h:1487:19: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'double' for 1st argument
2>__DEVICE__ double fabs(double __a) __NOEXCEPT { return __nv_fabs(__a); }
2> ^
2>D:\llvm-9.0.0-win.x64\lib\clang\9.0.0\include\__clang_cuda_cmath.h:67:18: note: candidate function not viable: no known conversion from 'Dual<float, 2>' to 'float' for 1st argument
2>__DEVICE__ float fabs(float __x) __NOEXCEPT { return ::fabsf(__x); }
2> ^
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\xtgmath.h:85:16: note: candidate template ignored: requirement '::std::is_integral_v<OSL_v1_11::Dual<float, 2> >' was not satisfied [with _Ty = OSL_v1_11::Dual<float, 2>]
2>_GENERIC_MATH1(fabs, _CRT_JIT_INTRINSIC)
2> ^
2>D:\llvm-9.0.0-win.x64\lib\clang\9.0.0\include\__clang_cuda_cmath.h:229:44: note: candidate template ignored: substitution failure [with __T = OSL_v1_11::Dual<float, 2>]: no type named 'type' in '__clang_cuda_enable_if<false, double>'
2>__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, fabs)
2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
2>D:\llvm-9.0.0-win.x64\lib\clang\9.0.0\include\__clang_cuda_cmath.h:193:7: note: expanded from macro '__CUDA_CLANG_FN_INTEGER_OVERLOAD_1'
2> __fn(__T __x) { \
2> ^