-
Notifications
You must be signed in to change notification settings - Fork 80
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] Visual studio fails to compile unit tests/examples #153
Comments
@akfite I've made a quick attempt at this and fixed a few things along the way, but it's still showing lots of compiler errors. I'll keep looking at it, but it could take a while. |
@akfite, I think the number of errors are so numerous that it's going to take a significant amount of time to get this compiling on VS. MSVC has a lot of problems with SFINAE and some C++17 features, which we rely on heavily. I will leave this open, but until we have the time or more use cases, it's likely going to be lower priority than other features. If anyone more familiar with the MSVC bugs would like to take a shot at it, we're open to PRs as well. |
@cliffburdick All good. If you can figure it out someday that would be awesome, but I think I can at least use your code as reference in the meantime. I wish I could fix it myself but I'm way out of my depth here. Thank you for looking into it! |
Is WSL supported? |
hi @sahuang, I was able to compile and run on wsl 2 with cuda installed. |
Update the VERSION argument value or use a ... suffix to tell -- pybind11 v2.6.2 Call Stack (most recent call first): -- checking python import module numpy -- NVBench CUDA architectures: 80;86 Update the VERSION argument value or use a ... suffix to tell CMake Deprecation Warning at build/_deps/gtest-src/googlemock/CMakeLists.txt:45 (cmake_minimum_required): Update the VERSION argument value or use a ... suffix to tell CMake Deprecation Warning at build/_deps/gtest-src/googletest/CMakeLists.txt:56 (cmake_minimum_required): Update the VERSION argument value or use a ... suffix to tell -- Configuring done (8.8s)
Some of these libraries may not be found correctly. CMake Warning at bench/CMakeLists.txt:22 (add_executable):
Some of these libraries may not be found correctly. -- Generating done (0.3s) |
Hi @yuanskinner, that doesn't look like an error, but rather your |
it's build success! thanks so much! CUDA Error: invalid device ordinal |
Hi @yuanskinner, do you have multiple GPUs in the system? |
no, only one rtx 3080 i also tried other examples,the detail log pls check attachment |
@yuanskinner how much system memory do you have? |
system memory 32.0 GB |
I think the problem is by default we use managed memory. Managed memory does not work well under WSL2 yet:
So you're likely hitting a WSL2+CUDA bug. This is not necessarily a problem; If you would like this to work in WSL2 with your own application, you can just avoid using managed memory and declare all your tensors with host or device memory. The examples will not work as-is, however. Would that work for you? |
I just tried the examples on a Geforce 3070, and they all work on Linux, so it appears this is related to the WSL2 issue above. |
Thank you for your patient answer,i just build my application in WSL on my home compute, The actual production environment is on a physical machine. |
i changed the demo like below ,and the same error in line CUDA_CHECK_LAST_ERROR();
`CUDA Error: invalid device ordinal Stack Trace: |
Hi @yuanskinner, I don't have a WSL2 system I can test on easily at the moment. Is it possible for you to try on a Linux machine? In the meantime I can try to get WSL2 working again. |
Hi @yuanskinner - the current channelize_poly implementation only supports maximally decimated channelization (i.e., decimation_factor == num_channels). This downsamples the input signal into the channels by a factor of M for M channels such that each channel has a sample rate of fs/M (where fs is the sampling rate of the input signal). It does not yet support oversampling, which would result in sample rates higher than fs/M for each channel. Is oversampling a feature that would be needed for your use case? If so, can you share rough dimensions of interest (input signal length, decimation factor, channel count)? |
|
@tbensonatl |
@yuanskinner @tbensonatl put in a fix for WSL2. Can you please try the latest commit? |
it's worked!!! thank you so so so so much! in the reduce.h line 1647 error: comparison of integer expressions of different signedness: ‘int’ and ‘std::array<int, 1>::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare] |
Which host compiler are you using? |
i just follow the doc README.md to compiler the code step by step. |
@yuanskinner can you share your cmake command? I can't reproduce those warnings on g++ 9.4. |
@yuanskinner another option is you can paste your entire error output and we can fix it in a branch and have you test. |
Jumping on since I am also interested in running MatX on WSL2 and built successfully by staying on the v0.5.0 tag, and cherry-picking the commit @cliffburdick mentioned here. That being said, the fft_conv example still gives the
|
Ah, it gets back to the managed memory, since fft_conv relies on managed memory for the () operator. Outlined here for why I get a seg fault. |
Hi @mfzmullen. to be clear, some of the examples use operator() to set up data before the example. This is purely to show how to do it, but as I mentioned above you can just not use managed memory altogether and everything should work under WSL2. There shouldn't be anywhere in the internals of MatX that we require managed memory. |
One thing you can try is change the allocations like this:
to
I think the examples should work after that using host-pinned memory. |
@cliffburdick sorry I wasn't clear, I had answered my own question/concern. I had already seen your earlier answer regarding not using managed memory with WSL and that () relies on having managed memory. I did the alternate of your suggestion and just did everything directly on device. Thanks!
|
It would be great if this library would support Windows builds. While I do understand the Linux only build due to the compiler compatibility issues, it poses quite a limit on number of users that could benefit from such library. It's hard to perceive it as a CuPy alternative in its current state. I did try to build it with Clang-CL (clang's MSVC driver) and MSVC; both cases were unsuccessful. The While this seems like Anyway, it would be great if Windows support was enabled at some point. |
Thanks @poretga99 . Last I tried with MSVC it had thousands of compiler errors. We plan to work through all the clang (Linux) errors first, and hopefully that will help a bit on the Windows side. |
+1 for Windows/MSVC compatibility! |
Describe the bug
CMake generates a solution that fails to compile 11 of 20 projects on VS2022.
From #147 :
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expect to successfully compile all unit tests & examples.
Code snippers
output log attached.
System details (please complete the following information):
The text was updated successfully, but these errors were encountered: