Git Product home page Git Product logo

Comments (3)

mondus avatar mondus commented on August 29, 2024

There is also an issue with assignment in a conditional statement. I have issued a PR (#63) for that but am not sure how to fix the issue above.

from jitify.

benbarsdell avatar benbarsdell commented on August 29, 2024

Thanks for the PR!

I filed an internal bug about the __host__ __device__ warnings; it seems to be a compiler issue.
I believe it only affects debug builds, but I don't know if that's of much help to you.

from jitify.

ptheywood avatar ptheywood commented on August 29, 2024

The __host__ __device__ warnings through MSVC also effect our release builds:

"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_60,code=\"sm_60,compute_60\" -gencode=arch=compute_60,code=\"compute_60,compute_60\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64" -x cu -rdc=true -IC:\projects\FLAMEGPU2_dev\include -IC:\projects\FLAMEGPU2_dev\src -IC:\projects\FLAMEGPU2_dev\externals -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include\..\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"     --keep-dir x64\Release -maxrregcount=0  --machine 64 --compile -cudart static --expt-relaxed-constexpr --Wreorder --Werror reorder,cross-execution-space-call -Xptxas=-Werror -Xnvlink=-Werror -lineinfo -Xcompiler="/EHsc /wd4505 /WX -Ob2"    -D_WINDOWS -DJITIFY_PRINT_LOG -DNDEBUG -D"CMAKE_INTDIR=\"Release\"" -DWIN32 -D_WINDOWS -DJITIFY_PRINT_LOG -DNDEBUG -D"CMAKE_INTDIR=\"Release\"" -D_MBCS -Xcompiler "/EHsc /W4 /nologo /O2 /Fdflamegpu2.dir\Release\flamegpu2.pdb /FS /Zi  /MD /GR" -o flamegpu2.dir\Release\CUDAScanCompaction.obj "C:\projects\FLAMEGPU2_dev\src\flamegpu\gpu\CUDAScanCompaction.cu" 
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\xutility(3942): error : calling a __host__ function from a __host__ __device__ function is not allowed [C:\projects\FLAMEGPU2_dev\build\FLAMEGPU2\flamegpu2.vcxproj]
            detected during:
              instantiation of "_OutIt std::move(_InIt, _InIt, _OutIt) [with _InIt=std::_Deque_iterator<std::_Deque_val<std::conditional_t<true, std::_Deque_simple_types<jitify::JitCache_impl::key_type>, std::_Deque_iter_types<jitify::JitCache_impl::key_type, size_t, ptrdiff_t, jitify::JitCache_impl::key_type *, const jitify::JitCache_impl::key_type *, jitify::JitCache_impl::key_type &, const jitify::JitCache_impl::key_type &, jitify::JitCache_impl::key_type **>>>>, _OutIt=std::_Deque_iterator<std::_Deque_val<std::conditional_t<true, std::_Deque_simple_types<jitify::JitCache_impl::key_type>, std::_Deque_iter_types<jitify::JitCache_impl::key_type, size_t, ptrdiff_t, jitify::JitCache_impl::key_type *, const jitify::JitCache_impl::key_type *, jitify::JitCache_impl::key_type &, const jitify::JitCache_impl::key_type &, jitify::JitCache_impl::key_type **>>>>]" 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\deque(1302): here
              instantiation of "std::deque<_Ty, _Alloc>::iterator std::deque<_Ty, _Alloc>::erase(std::deque<_Ty, _Alloc>::const_iterator, std::deque<_Ty, _Alloc>::const_iterator) [with _Ty=jitify::JitCache_impl::key_type, _Alloc=std::allocator<jitify::JitCache_impl::key_type>]" 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\deque(1275): here
              instantiation of "std::deque<_Ty, _Alloc>::iterator std::deque<_Ty, _Alloc>::erase(std::deque<_Ty, _Alloc>::const_iterator) [with _Ty=jitify::JitCache_impl::key_type, _Alloc=std::allocator<jitify::JitCache_impl::key_type>]" 
  C:\projects\FLAMEGPU2_dev\externals\jitify/jitify.hpp(227): here
              instantiation of "void jitify::ObjectCache<KeyType, ValueType>::touch(const jitify::ObjectCache<KeyType, ValueType>::key_type &) [with KeyType=jitify::JitCache_impl::key_type, ValueType=jitify::detail::CUDAKernel]" 
  C:\projects\FLAMEGPU2_dev\externals\jitify/jitify.hpp(235): here
              instantiation of "jitify::ObjectCache<KeyType, ValueType>::value_type &jitify::ObjectCache<KeyType, ValueType>::get(const jitify::ObjectCache<KeyType, ValueType>::key_type &) [with KeyType=jitify::JitCache_impl::key_type, ValueType=jitify::detail::CUDAKernel]" 
  C:\projects\FLAMEGPU2_dev\externals\jitify/jitify.hpp(2866): here
  
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\xutility(3943): error : calling a __host__ function from a __host__ __device__ function is not allowed [C:\projects\FLAMEGPU2_dev\build\FLAMEGPU2\flamegpu2.vcxproj]
            detected during:
              instantiation of "_OutIt std::move(_InIt, _InIt, _OutIt) [with _InIt=std::_Deque_iterator<std::_Deque_val<std::conditional_t<true, std::_Deque_simple_types<jitify::JitCache_impl::key_type>, std::_Deque_iter_types<jitify::JitCache_impl::key_type, size_t, ptrdiff_t, jitify::JitCache_impl::key_type *, const jitify::JitCache_impl::key_type *, jitify::JitCache_impl::key_type &, const jitify::JitCache_impl::key_type &, jitify::JitCache_impl::key_type **>>>>, _OutIt=std::_Deque_iterator<std::_Deque_val<std::conditional_t<true, std::_Deque_simple_types<jitify::JitCache_impl::key_type>, std::_Deque_iter_types<jitify::JitCache_impl::key_type, size_t, ptrdiff_t, jitify::JitCache_impl::key_type *, const jitify::JitCache_impl::key_type *, jitify::JitCache_impl::key_type &, const jitify::JitCache_impl::key_type &, jitify::JitCache_impl::key_type **>>>>]" 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\deque(1302): here
              instantiation of "std::deque<_Ty, _Alloc>::iterator std::deque<_Ty, _Alloc>::erase(std::deque<_Ty, _Alloc>::const_iterator, std::deque<_Ty, _Alloc>::const_iterator) [with _Ty=jitify::JitCache_impl::key_type, _Alloc=std::allocator<jitify::JitCache_impl::key_type>]" 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\deque(1275): here
              instantiation of "std::deque<_Ty, _Alloc>::iterator std::deque<_Ty, _Alloc>::erase(std::deque<_Ty, _Alloc>::const_iterator) [with _Ty=jitify::JitCache_impl::key_type, _Alloc=std::allocator<jitify::JitCache_impl::key_type>]" 
  C:\projects\FLAMEGPU2_dev\externals\jitify/jitify.hpp(227): here
              instantiation of "void jitify::ObjectCache<KeyType, ValueType>::touch(const jitify::ObjectCache<KeyType, ValueType>::key_type &) [with KeyType=jitify::JitCache_impl::key_type, ValueType=jitify::detail::CUDAKernel]" 
  C:\projects\FLAMEGPU2_dev\externals\jitify/jitify.hpp(235): here
              instantiation of "jitify::ObjectCache<KeyType, ValueType>::value_type &jitify::ObjectCache<KeyType, ValueType>::get(const jitify::ObjectCache<KeyType, ValueType>::key_type &) [with KeyType=jitify::JitCache_impl::key_type, ValueType=jitify::detail::CUDAKernel]" 
  C:\projects\FLAMEGPU2_dev\externals\jitify/jitify.hpp(2866): here
  
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\xutility(3944): error : calling a __host__ function from a __host__ __device__ function is not allowed [C:\projects\FLAMEGPU2_dev\build\FLAMEGPU2\flamegpu2.vcxproj]
            detected during:
              instantiation of "_OutIt std::move(_InIt, _InIt, _OutIt) [with _InIt=std::_Deque_iterator<std::_Deque_val<std::conditional_t<true, std::_Deque_simple_types<jitify::JitCache_impl::key_type>, std::_Deque_iter_types<jitify::JitCache_impl::key_type, size_t, ptrdiff_t, jitify::JitCache_impl::key_type *, const jitify::JitCache_impl::key_type *, jitify::JitCache_impl::key_type &, const jitify::JitCache_impl::key_type &, jitify::JitCache_impl::key_type **>>>>, _OutIt=std::_Deque_iterator<std::_Deque_val<std::conditional_t<true, std::_Deque_simple_types<jitify::JitCache_impl::key_type>, std::_Deque_iter_types<jitify::JitCache_impl::key_type, size_t, ptrdiff_t, jitify::JitCache_impl::key_type *, const jitify::JitCache_impl::key_type *, jitify::JitCache_impl::key_type &, const jitify::JitCache_impl::key_type &, jitify::JitCache_impl::key_type **>>>>]" 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\deque(1302): here
              instantiation of "std::deque<_Ty, _Alloc>::iterator std::deque<_Ty, _Alloc>::erase(std::deque<_Ty, _Alloc>::const_iterator, std::deque<_Ty, _Alloc>::const_iterator) [with _Ty=jitify::JitCache_impl::key_type, _Alloc=std::allocator<jitify::JitCache_impl::key_type>]" 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\deque(1275): here
              instantiation of "std::deque<_Ty, _Alloc>::iterator std::deque<_Ty, _Alloc>::erase(std::deque<_Ty, _Alloc>::const_iterator) [with _Ty=jitify::JitCache_impl::key_type, _Alloc=std::allocator<jitify::JitCache_impl::key_type>]" 
  C:\projects\FLAMEGPU2_dev\externals\jitify/jitify.hpp(227): here
              instantiation of "void jitify::ObjectCache<KeyType, ValueType>::touch(const jitify::ObjectCache<KeyType, ValueType>::key_type &) [with KeyType=jitify::JitCache_impl::key_type, ValueType=jitify::detail::CUDAKernel]" 
  C:\projects\FLAMEGPU2_dev\externals\jitify/jitify.hpp(235): here
              instantiation of "jitify::ObjectCache<KeyType, ValueType>::value_type &jitify::ObjectCache<KeyType, ValueType>::get(const jitify::ObjectCache<KeyType, ValueType>::key_type &) [with KeyType=jitify::JitCache_impl::key_type, ValueType=jitify::detail::CUDAKernel]" 
  C:\projects\FLAMEGPU2_dev\externals\jitify/jitify.hpp(2866): here
  
  3 errors detected in the compilation of "C:/Users/appveyor/AppData/Local/Temp/1/tmpxft_00000d18_00000000-8_CUDAScanCompaction.compute_60.cpp1.ii".
  CUDAScanCompaction.cu

https://ci.appveyor.com/project/mondus/flamegpu2-dev/builds/32555760#L182

from jitify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.