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

Undefined identifiers in all_reduce.cu #9

Closed
apaszke opened this issue Jan 24, 2016 · 6 comments
Closed

Undefined identifiers in all_reduce.cu #9

apaszke opened this issue Jan 24, 2016 · 6 comments

Comments

@apaszke
Copy link
Contributor

apaszke commented Jan 24, 2016

Hello!

I'm trying to compile nccl, but I'm getting the following errors:

Compiling src/all_reduce.cu         > build/obj/all_reduce.o   
src/reduce_kernel.h(199): error: identifier "__half22float2" is undefined

src/reduce_kernel.h(203): error: identifier "__float22half2_rn" is undefined

src/reduce_kernel.h(214): error: identifier "__half22float2" is undefined

src/reduce_kernel.h(218): error: identifier "__float22half2_rn" is undefined

src/reduce_kernel.h(229): error: identifier "__half22float2" is undefined

src/reduce_kernel.h(233): error: identifier "__float22half2_rn" is undefined

src/reduce_kernel.h(248): error: identifier "__half22float2" is undefined

src/reduce_kernel.h(252): error: identifier "__float22half2_rn" is undefined

8 errors detected in the compilation of "/tmp/tmpxft_000004bb_00000000-13_all_reduce.compute_52.cpp1.ii".
make: *** [build/obj/all_reduce.o] Error 2

I have a TITAN X and cuda-7.5 installed. I ran make CUDA_HOME=/usr/local/cuda-7.5 test to build the library.

Do you have any idea why does it fail? I've seen that these identifiers are defined in /usr/local/cuda-7.5/includes/cuda_fp16.h, but it's not included in reduce_kernel.h. Also, they are guarded by a check __CUDA_ARCH__ >= 530, but my GPU has capability 5.2. Since TITAN is a Maxwell card, then it should be supported, right?

@nluehr
Copy link
Contributor

nluehr commented Jan 24, 2016

Your build line is correct. As for cuda_fp16.h, it gets included from nccl.h (which is in turn included in core.h) whenever CUDART_VERSION >= 7050.

I'm a bit confused about the include guards you reference in reduce_kernel.h. These should select either Maxwell (CUDA_ARCH>= 500) or Kepler (CUDA_ARCH >= 300 && CUDA_ARCH < 500). There shouldn't be any reference to a CUDA_ARCH 530.

@cliffwoolley
Copy link
Collaborator

Do you have more than one CUDA Toolkit version installed? Any chance you
have an RC rather than production release version of CUDA 7.5?
On Jan 24, 2016 5:14 PM, "Nathan Luehr" [email protected] wrote:

Your build line is correct. As for cuda_fp16.h, it gets included from
nccl.h (which is in turn included in core.h) whenever CUDART_VERSION >=
7050.

I'm a bit confused about the include guards you reference in
reduce_kernel.h. These should select either Maxwell (CUDA_ARCH>= 500)
or Kepler (CUDA_ARCH >= 300 && CUDA_ARCH < 500). There shouldn't be
any reference to a CUDA_ARCH 530.


Reply to this email directly or view it on GitHub
#9 (comment).

@apaszke
Copy link
Contributor Author

apaszke commented Jan 25, 2016

That's wierd. I think I should have a production release. When I print contents of /usr/local/cuda/version.txt and /usr/local/cuda-7.5/version they both say CUDA Version 7.5.7.

This is what I've found in cuda_fp16.h:

#if __CUDA_ARCH__ >= 530 || !defined(__CUDA_ARCH__)                                 
__CUDA_FP16_DECL__ __half2 __heq2(const __half2 a, const __half2 b);                
__CUDA_FP16_DECL__ __half2 __hne2(const __half2 a, const __half2 b);                
__CUDA_FP16_DECL__ __half2 __hle2(const __half2 a, const __half2 b);                
__CUDA_FP16_DECL__ __half2 __hge2(const __half2 a, const __half2 b);                
__CUDA_FP16_DECL__ __half2 __hlt2(const __half2 a, const __half2 b);                
__CUDA_FP16_DECL__ __half2 __hgt2(const __half2 a, const __half2 b);                
__CUDA_FP16_DECL__ __half2 __hequ2(const __half2 a, const __half2 b);               
__CUDA_FP16_DECL__ __half2 __hneu2(const __half2 a, const __half2 b);               
__CUDA_FP16_DECL__ __half2 __hleu2(const __half2 a, const __half2 b);               
__CUDA_FP16_DECL__ __half2 __hgeu2(const __half2 a, const __half2 b);               
__CUDA_FP16_DECL__ __half2 __hltu2(const __half2 a, const __half2 b);               
__CUDA_FP16_DECL__ __half2 __hgtu2(const __half2 a, const __half2 b);               
__CUDA_FP16_DECL__ __half2 __hadd2(const __half2 a, const __half2 b);               
__CUDA_FP16_DECL__ __half2 __hsub2(const __half2 a, const __half2 b);               
__CUDA_FP16_DECL__ __half2 __hmul2(const __half2 a, const __half2 b);               
__CUDA_FP16_DECL__ __half2 __hadd2_sat(const __half2 a, const __half2 b);           
__CUDA_FP16_DECL__ __half2 __hsub2_sat(const __half2 a, const __half2 b);           
__CUDA_FP16_DECL__ __half2 __hmul2_sat(const __half2 a, const __half2 b);           
__CUDA_FP16_DECL__ __half2 __hfma2(const __half2 a, const __half2 b, const __half2 c); 
__CUDA_FP16_DECL__ __half2 __hfma2_sat(const __half2 a, const __half2 b, const __half2 c); 
__CUDA_FP16_DECL__ __half __hadd(const __half a, const __half b);                   
__CUDA_FP16_DECL__ __half __hsub(const __half a, const __half b);                   
__CUDA_FP16_DECL__ __half __hmul(const __half a, const __half b);                   
__CUDA_FP16_DECL__ __half __hadd_sat(const __half a, const __half b);               
__CUDA_FP16_DECL__ __half __hsub_sat(const __half a, const __half b);               
__CUDA_FP16_DECL__ __half __hmul_sat(const __half a, const __half b);               
__CUDA_FP16_DECL__ __half __hfma(const __half a, const __half b, const __half c); 
__CUDA_FP16_DECL__ __half __hfma_sat(const __half a, const __half b, const __half c); 
__CUDA_FP16_DECL__ float __low2float(const __half2 l);                              
__CUDA_FP16_DECL__ float __high2float(const __half2 l);                             
__CUDA_FP16_DECL__ float2 __half22float2(const __half2 l);  

You can see that one of the missing identifiers in on the last line of this snippet. It only appears in a it's forward declaration and it's definition is that file.

@cliffwoolley
Copy link
Collaborator

7.5.7 was the release candidate build, actually. The production release
build was numbered 7.5.18.

Please redownload and reinstall CUDA 7.5; it should work with the 7.5.18
build.

Thanks!
On Jan 25, 2016 6:51 AM, "Adam Paszke" [email protected] wrote:

That's wierd. I think I should have a production release. When I print
contents of /usr/local/cuda/version.txt and /usr/local/cuda-7.5/version
they both say CUDA Version 7.5.7.

This is what I've found in cuda_fp16.h:

#if CUDA_ARCH >= 530 || !defined(CUDA_ARCH)
CUDA_FP16_DECL half2 __heq2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hne2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hle2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hge2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hlt2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hgt2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hequ2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hneu2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hleu2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hgeu2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hltu2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hgtu2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hadd2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hsub2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hmul2(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hadd2_sat(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hsub2_sat(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hmul2_sat(const __half2 a, const __half2 b);
__CUDA_FP16_DECL
half2 __hfma2(const __half2 a, const __half2 b, const __half2 c);
__CUDA_FP16_DECL
half2 __hfma2_sat(const __half2 a, const __half2 b, const __half2 c);
__CUDA_FP16_DECL
half __hadd(const __half a, const __half b);
__CUDA_FP16_DECL
half __hsub(const __half a, const __half b);
__CUDA_FP16_DECL
half __hmul(const __half a, const __half b);
__CUDA_FP16_DECL
half __hadd_sat(const __half a, const __half b);
__CUDA_FP16_DECL
half __hsub_sat(const __half a, const __half b);
__CUDA_FP16_DECL
half __hmul_sat(const __half a, const __half b);
__CUDA_FP16_DECL
half __hfma(const __half a, const __half b, const __half c);
__CUDA_FP16_DECL
half __hfma_sat(const __half a, const __half b, const __half c);
__CUDA_FP16_DECL
float low2float(const __half2 l);
__CUDA_FP16_DECL
float high2float(const __half2 l);
__CUDA_FP16_DECL
float2 __half22float2(const __half2 l);

You can see that one of the missing identifiers in on the last line of
this snippet. It only appears in a it's forward declaration and it's
definition is that file.


Reply to this email directly or view it on GitHub
#9 (comment).

@apaszke
Copy link
Contributor Author

apaszke commented Jan 25, 2016

I'll try it. Thanks for help! 😊

@apaszke
Copy link
Contributor Author

apaszke commented Jan 25, 2016

Yes, that worked. Thanks a lot!

@apaszke apaszke closed this as completed Jan 25, 2016
alexander-zinoviev pushed a commit to alexander-zinoviev/nccl that referenced this issue Nov 7, 2024
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

3 participants