The Wayback Machine - https://web.archive.org/web/20201208095201/https://github.com/pytorch/pytorch/issues/46391
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

Warnings during compiling: floating-point value does not fit in required integral type #46391

Open
realiti4 opened this issue Oct 15, 2020 · 3 comments

Comments

@realiti4
Copy link

@realiti4 realiti4 commented Oct 15, 2020

Hi, I've moved to Cuda 11.0 and I am getting warnings below while compiling. I just can't remember exactly, but I don't think I saw these with 10.2. I don't know if it related, but run_test.py is also failing when it comes to Distribution related tests. I can post test's log when the build is complete, if it is helpful. Thank you.

[3950/5005] Building NVCC (Device) object caffe2/CMakeFile...ve/cuda/torch_cuda_generated_DistributionRandomKernel.cu.o
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/core/TransformationHelper.h(60): warning: floating-point value does not fit in required integral type
          detected during:
            instantiation of "T at::transformation::uniform_int<T,V>(V) [with T=double, V=uint64_t]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionTemplates.h(352): here
            instantiation of "void at::native::templates::cuda::random_kernel(at::TensorIterator &, RNG) [with RNG=at::CUDAGeneratorImpl *]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionRandomKernel.cu(44): here

/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/core/TransformationHelper.h(64): warning: floating-point value does not fit in required integral type
          detected during:
            instantiation of "T at::transformation::uniform_int<T,V>(V) [with T=double, V=uint64_t]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionTemplates.h(352): here
            instantiation of "void at::native::templates::cuda::random_kernel(at::TensorIterator &, RNG) [with RNG=at::CUDAGeneratorImpl *]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionRandomKernel.cu(44): here

/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/core/TransformationHelper.h(60): warning: floating-point value does not fit in required integral type
          detected during:
            instantiation of "T at::transformation::uniform_int<T,V>(V) [with T=double, V=uint32_t]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionTemplates.h(352): here
            instantiation of "void at::native::templates::cuda::random_kernel(at::TensorIterator &, RNG) [with RNG=at::CUDAGeneratorImpl *]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionRandomKernel.cu(44): here

/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/core/TransformationHelper.h(64): warning: floating-point value does not fit in required integral type
          detected during:
            instantiation of "T at::transformation::uniform_int<T,V>(V) [with T=double, V=uint32_t]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionTemplates.h(352): here
            instantiation of "void at::native::templates::cuda::random_kernel(at::TensorIterator &, RNG) [with RNG=at::CUDAGeneratorImpl *]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionRandomKernel.cu(44): here

/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/core/TransformationHelper.h(60): warning: floating-point value does not fit in required integral type
          detected during:
            instantiation of "T at::transformation::uniform_int<T,V>(V) [with T=float, V=uint64_t]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionTemplates.h(352): here
            instantiation of "void at::native::templates::cuda::random_kernel(at::TensorIterator &, RNG) [with RNG=at::CUDAGeneratorImpl *]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionRandomKernel.cu(44): here

/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/core/TransformationHelper.h(64): warning: floating-point value does not fit in required integral type
          detected during:
            instantiation of "T at::transformation::uniform_int<T,V>(V) [with T=float, V=uint64_t]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionTemplates.h(352): here
            instantiation of "void at::native::templates::cuda::random_kernel(at::TensorIterator &, RNG) [with RNG=at::CUDAGeneratorImpl *]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionRandomKernel.cu(44): here

/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/core/TransformationHelper.h(60): warning: floating-point value does not fit in required integral type
          detected during:
            instantiation of "T at::transformation::uniform_int<T,V>(V) [with T=float, V=uint32_t]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionTemplates.h(352): here
            instantiation of "void at::native::templates::cuda::random_kernel(at::TensorIterator &, RNG) [with RNG=at::CUDAGeneratorImpl *]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionRandomKernel.cu(44): here

/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/core/TransformationHelper.h(64): warning: floating-point value does not fit in required integral type
          detected during:
            instantiation of "T at::transformation::uniform_int<T,V>(V) [with T=float, V=uint32_t]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionTemplates.h(352): here
            instantiation of "void at::native::templates::cuda::random_kernel(at::TensorIterator &, RNG) [with RNG=at::CUDAGeneratorImpl *]" 
/home/realiti/virtualenvs/git-repos/pytorch/aten/src/ATen/native/cuda/DistributionRandomKernel.cu(44): here

  • PyTorch Version (e.g., 1.0): release/1.7 branch
  • OS (e.g., Linux): Ubuntu 20.04
  • How you installed PyTorch (conda, pip, source): source build in virtualenv
  • Build command you used (if compiling from source): python setup.py install
  • Python version: 3.8.5
  • CUDA/cuDNN version: 11.0 / 8.0.4
  • GPU models and configuration: rtx 2060
  • Any other relevant information: gcc 8.4

cc @ngimel

@malfet
Copy link
Contributor

@malfet malfet commented Oct 15, 2020

Thank you for reporting the issue. We would gladly accept PR that fixes the warnings.

@krush11
Copy link

@krush11 krush11 commented Oct 31, 2020

I would like to work on this repo but i am new to it. Can you direct me on how/where to start?

@Lee-Gen
Copy link

@Lee-Gen Lee-Gen commented Nov 7, 2020

I am new to this platform but wanna learn all about it. Actually this is the very first issue that I'm trying to work on.
Can you advise me regarding this ?

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

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.