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

[BUG]: build error when cmake apply libcudacxx patch #397

Closed
1 task done
gamdwk opened this issue Nov 22, 2023 · 4 comments
Closed
1 task done

[BUG]: build error when cmake apply libcudacxx patch #397

gamdwk opened this issue Nov 22, 2023 · 4 comments
Labels
topic: build CMake build issue type: bug Something isn't working

Comments

@gamdwk
Copy link

gamdwk commented Nov 22, 2023

Is this a duplicate?

Type of Bug

Compile-time Error

Describe the bug

when I use cmake to build the example, It raise:

-- CPM: Adding package cuco@ (dev)
-- CPM: cuco: Using local package [email protected]
-- CPM: cuco: Adding package [email protected] (2.1.0)
-- rapids-cmake [libcudacxx]: failed to apply diff install_rules.diffrapids-cmake [libcudacxx]: git diff output: error: patch failed: cmake/libcudacxxInstallRules.cmake:28
-- error: cmake/libcudacxxInstallRules.cmake: patch does not apply
-- error: patch failed: lib/cmake/libcudacxx/libcudacxx-header-search.cmake.in:1
-- error: lib/cmake/libcudacxx/libcudacxx-header-search.cmake.in: patch does not apply
-- 
-- rapids-cmake [libcudacxx]: applied diff reroot_support.diff to fix issue: 'Support conda-forge usage of CMake rerooting [https://github.com/NVIDIA/libcudacxx/pull/490], requires libcudacxx/install_rules.diff.'
-- rapids-cmake [libcudacxx]: applied diff proclaim_return_type_nv_exec_check_disable.diff to fix issue: 'Use pragma to disable execution checks in cuda::proclaim_return_type. [https://github.com/NVIDIA/libcudacxx/pull/448]'
-- rapids-cmake [libcudacxx]: applied diff memory_resource.diff to fix issue: 'Allow {async_}resource_ref to be constructible from a pointer. [https://github.com/NVIDIA/libcudacxx/pull/439]'
-- Configuring done (3.1s)
-- Generating done (0.0s)

and then I compile:

/cache/build/_deps/cuco-src/include/cuco/detail/__config:28:2: error: #error "Support for relaxed constexpr is required"
   28 | #error "Support for relaxed constexpr is required"
      |  ^~~~~
/cache/build/_deps/cuco-src/include/cuco/detail/__config:32:2: error: #error "Support for extended device lambdas is required"
   32 | #error "Support for extended device lambdas is required"
      |  ^~~~~
make[2]: *** [CMakeFiles/cache_gcn.dir/build.make:77: CMakeFiles/cache_gcn.dir/cache.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:133: CMakeFiles/cache_gcn.dir/all] Error 2
make: *** [Makefile:136: all] Error 2


How to fix it?


### How to Reproduce

just cmake ..

### Expected behavior

It can be compile correctly.

### Reproduction link

_No response_

### Operating System

Ubuntu Linux 20.04 and nvcr.io/nvidia/nvhpc:23.9-devel-cuda_multi-ubuntu20.04

### nvidia-smi output

I use nvidia  official docker container with nvidia Hpc Sdk 23.9 ,so the CUDA Version is not same with nvcc.
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.105.01   Driver Version: 515.105.01   CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA A100 80G...  Off  | 00000000:31:00.0 Off |                    0 |
| N/A   36C    P0    44W / 300W |      0MiB / 81920MiB |      0%      Default |
|                               |                      |             Disabled |
+-------------------------------+----------------------+----------------------+
|   1  NVIDIA A800 80G...  Off  | 00000000:4B:00.0 Off |                    0 |
| N/A   40C    P0    50W / 300W |      0MiB / 81920MiB |      0%      Default |
|                               |                      |             Disabled |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

### NVCC version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
@gamdwk gamdwk added the type: bug Something isn't working label Nov 22, 2023
@gamdwk gamdwk changed the title [BUG]: E [BUG]: build error when cmake apply libcudacxx patch Nov 22, 2023
@PointKernel
Copy link
Member

PointKernel commented Nov 22, 2023

Thanks for reporting the issue.

There was a relevant discussion here #391. Essentially, our code relies on relaxed lambda and constexpr expressions thus building with --expt-extended-lambda --expt-relaxed-constexpr options is necessary.

@PointKernel PointKernel added the topic: build CMake build issue label Nov 22, 2023
@gamdwk gamdwk closed this as completed Nov 22, 2023
@gamdwk gamdwk reopened this Nov 22, 2023
@gamdwk
Copy link
Author

gamdwk commented Nov 22, 2023

Thanks! It can be compiled now.but the cmake build error still exists. So It means this error can be ignore?

@sleeepyjack
Copy link
Collaborator

Yes, those are falsely flagged as errors it seems. I'll ping the maintainers of our build ecosystem to see if we can get this resolved. Meanwhile I opened #398 which now prints a hint about which compiler flags are missing during build.

@PointKernel
Copy link
Member

Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: build CMake build issue type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants