Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Compiling #1

Closed
half-potato opened this issue Apr 27, 2023 · 2 comments
Closed

Error Compiling #1

half-potato opened this issue Apr 27, 2023 · 2 comments

Comments

@half-potato
Copy link

half-potato commented Apr 27, 2023

/home/amai/ParticleNeRF/src/testbed.cu:179:23: error: no match for ‘operator=’ (operand types are ‘ngp::Testbed::Volume’ and ‘<brace-enclosed initializer list>’)
  179 |         m_volume = {};
      |                       ^
/home/amai/ParticleNeRF/include/neural-graphics-primitives/testbed.h:852:15: note: candidate: ‘ngp::Testbed::Volume& ngp::Testbed::Volume::operator=(ngp::Testbed::Volume&&)’
  852 |         struct Volume {
      |               ^~~~~~
/home/amai/ParticleNeRF/include/neural-graphics-primitives/testbed.h:852:15: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘ngp::Testbed::Volume&&’
/home/amai/ParticleNeRF/include/particles/particles.h: In instantiation of ‘void particle::Particles<T, POS_DIMS>::init_positions_grid(tcnn::default_rng_t&, uint32_t) [with T = __half; unsigned int POS_DIMS = 3; tcnn::default_rng_t = tcnn::pcg32; uint32_t = unsigned int]’:
/home/amai/ParticleNeRF/include/particles/particles.h:356:1:   required from ‘void particle::Particles<T, POS_DIMS>::init_random(tcnn::default_rng_t&, uint32_t, uint32_t) [with T = __half; unsigned int POS_DIMS = 3; tcnn::default_rng_t = tcnn::pcg32; uint32_t = unsigned int]’
/home/amai/ParticleNeRF/include/particles/particle_encoding.h:275:36:   required from ‘particle::ParticleEncodingTemplated<T, POS_DIMS, N_FEATURE_DIMS>::ParticleEncodingTemplated(const particle::json&) [with T = __half; unsigned int POS_DIMS = 3; unsigned int N_FEATURE_DIMS = 2; particle::json = nlohmann::basic_json<>]’
/home/amai/ParticleNeRF/include/particles/particle_encoding.h:643:17:   required from ‘particle::ParticleEncoding<T>* particle::create_particle_encoding(uint32_t, const json&) [with T = __half; uint32_t = unsigned int; json = nlohmann::basic_json<>]’
/home/amai/ParticleNeRF/src/testbed.cu:3772:92:   required from here
/home/amai/ParticleNeRF/include/particles/particles.h:369:26: warning: narrowing conversion of ‘res’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘Eigen::Matrix<int, 3, 1>::Scalar’ {aka ‘int’} [-Wnarrowing]
  369 |         Eigen::Vector3i res3d = {res, res, res};
      |                          ^~~
/home/amai/ParticleNeRF/include/particles/particles.h:369:31: warning: narrowing conversion of ‘res’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘Eigen::Matrix<int, 3, 1>::Scalar’ {aka ‘int’} [-Wnarrowing]
  369 |         Eigen::Vector3i res3d = {res, res, res};
      |                               ^~~
/home/amai/ParticleNeRF/include/particles/particles.h:369:36: warning: narrowing conversion of ‘res’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘Eigen::Matrix<int, 3, 1>::Scalar’ {aka ‘int’} [-Wnarrowing]
  369 |         Eigen::Vector3i res3d = {res, res, res};
      |                                    ^~~
/home/amai/ParticleNeRF/include/particles/particles.h: In instantiation of ‘void particle::Particles<T, POS_DIMS>::init_positions_grid(tcnn::default_rng_t&, uint32_t) [with T = __half; unsigned int POS_DIMS = 2; tcnn::default_rng_t = tcnn::pcg32; uint32_t = unsigned int]’:
/home/amai/ParticleNeRF/include/particles/particles.h:356:1:   required from ‘void particle::Particles<T, POS_DIMS>::init_random(tcnn::default_rng_t&, uint32_t, uint32_t) [with T = __half; unsigned int POS_DIMS = 2; tcnn::default_rng_t = tcnn::pcg32; uint32_t = unsigned int]’
/home/amai/ParticleNeRF/include/particles/particle_encoding.h:275:36:   required from ‘particle::ParticleEncodingTemplated<T, POS_DIMS, N_FEATURE_DIMS>::ParticleEncodingTemplated(const particle::json&) [with T = __half; unsigned int POS_DIMS = 2; unsigned int N_FEATURE_DIMS = 2; particle::json = nlohmann::basic_json<>]’
/home/amai/ParticleNeRF/include/particles/particle_encoding.h:654:17:   required from ‘particle::ParticleEncoding<T>* particle::create_particle_encoding(uint32_t, const json&) [with T = __half; uint32_t = unsigned int; json = nlohmann::basic_json<>]’
/home/amai/ParticleNeRF/src/testbed.cu:3772:92:   required from here
/home/amai/ParticleNeRF/include/particles/particles.h:369:26: warning: narrowing conversion of ‘res’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘Eigen::Matrix<int, 3, 1>::Scalar’ {aka ‘int’} [-Wnarrowing]
  369 |         Eigen::Vector3i res3d = {res, res, res};
      |                          ^~~
/home/amai/ParticleNeRF/include/particles/particles.h:369:31: warning: narrowing conversion of ‘res’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘Eigen::Matrix<int, 3, 1>::Scalar’ {aka ‘int’} [-Wnarrowing]
  369 |         Eigen::Vector3i res3d = {res, res, res};
      |                               ^~~
/home/amai/ParticleNeRF/include/particles/particles.h:369:36: warning: narrowing conversion of ‘res’ from ‘uint32_t’ {aka ‘unsigned int’} to ‘Eigen::Matrix<int, 3, 1>::Scalar’ {aka ‘int’} [-Wnarrowing]
  369 |         Eigen::Vector3i res3d = {res, res, res};

This is most likely caused by gcc 12.2.1 and CUDA 12.1, but I'm interested in updating the code to ensure compatibility with these newer compilers. Not entirely sure how to fix this issue though.

@jc211
Copy link
Owner

jc211 commented Apr 27, 2023

Hey there, that code is unchanged from InstantNGP. I'm not sure what compilers they support. Maybe you could just go

m_volume = Volume()

instead of

m_volume = {}

@half-potato
Copy link
Author

That fixed it, along with pybind/pybind11#4606. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants