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

vectorAdd_profiled fails to compile with VS2019 #345

Closed
Q-Minh opened this issue May 27, 2022 · 8 comments
Closed

vectorAdd_profiled fails to compile with VS2019 #345

Q-Minh opened this issue May 27, 2022 · 8 comments
Assignees
Labels
bug ms-windows Related to the Microsoft Windows operating system resolved-on-development

Comments

@Q-Minh
Copy link

Q-Minh commented May 27, 2022

The example target vectorAdd_profiled has the error cuda-api-wrappers/src\cuda/nvtx/profiling.hpp(339): error : no instance of function template "cuda::profiling::detail_::name_host_thread" matches the argument list.

eyalroz added a commit that referenced this issue May 27, 2022
… a thread ID before trying to pass it to the NVTX naming function.
@eyalroz
Copy link
Owner

eyalroz commented May 27, 2022

Try it now.

@Q-Minh
Copy link
Author

Q-Minh commented May 28, 2022

So, I made some modifications to the code to make the example compile on my end, but it looks like I can't submit a PR on this repo, so I will just list my changes here. I basically replaced every instance of #if __cplusplus >= 201703L with #if __cplusplus >= 201703L || _MSVC_LANG >= 201703L in the code, specifically in the files:

  • examples/modified_cuda_samples/memMapIPCDrv/child.cpp
  • examples/other/jitify.cpp
  • examples/other/jitify/type_name.hpp
  • cuda/api/link.hpp
  • cuda/nvrtc/detail/marshalled_options.hpp
  • cuda/api/module.hpp
  • cuda/nvrtc/types.hpp
    because some files use std::string_view, std::to_char, or std::filesystem.

Then, because std::size_t is defined to be unsigned long long on some platforms, for example my platform, you can add corresponding overloads append_to_current(unsigned long long) in the cuda/nvrtc/detail/marshalled_options.hpp file, otherwise compilation will fail, since the call to append_to_current(cuda::size_t{}) is ambiguous, and could match many different overloads.

@eyalroz
Copy link
Owner

eyalroz commented May 28, 2022

@Q-Minh : To submit a PR, you clone the repo, create a branch, then submit the PR.

@Q-Minh
Copy link
Author

Q-Minh commented May 28, 2022

@Q-Minh : To submit a PR, you clone the repo, create a branch, then submit the PR.

That's what I did, but I get an HTTP 403 when I attempt to push the branch onto the remote. I don't have permissions.

symqminh pushed a commit to symqminh/cuda-api-wrappers that referenced this issue May 28, 2022
The C++ standard checking macros specific to MSVC must also be added
wherever any C++17 specific feature is used, for example
std::string_view and std::to_char.

Additionally, std::size_t evaluates to unsigned long long on some
platforms, such that overloads in marshalled_options.hpp must support
unsigned long long.
@Q-Minh
Copy link
Author

Q-Minh commented May 28, 2022

Let me try it again, it might have to do with https vs ssh, since I have multiple github accounts on the same system.

@Q-Minh
Copy link
Author

Q-Minh commented May 28, 2022

@eyalroz Yeah, I can't push the branch onto the remote, unfortunately. Might be some problem on my end. Do you mind making the changes for me? The fist change is a pretty quick string search and replace, and the second one is just writing up 2 overloads. :)

eyalroz added a commit that referenced this issue May 28, 2022
… a thread ID before trying to pass it to the NVTX naming function.
@eyalroz
Copy link
Owner

eyalroz commented May 28, 2022

Does it work?

@eyalroz eyalroz added bug ms-windows Related to the Microsoft Windows operating system labels May 28, 2022
@Q-Minh
Copy link
Author

Q-Minh commented May 28, 2022

Yes, it does.

@eyalroz eyalroz self-assigned this May 28, 2022
eyalroz added a commit that referenced this issue May 29, 2022
… a thread ID before trying to pass it to the NVTX naming function.
eyalroz added a commit that referenced this issue Jun 2, 2022
… a thread ID before trying to pass it to the NVTX naming function.
eyalroz added a commit that referenced this issue Jun 20, 2022
… a thread ID before trying to pass it to the NVTX naming function.
eyalroz added a commit that referenced this issue Jun 20, 2022
… a thread ID before trying to pass it to the NVTX naming function.
eyalroz added a commit that referenced this issue Jun 20, 2022
… a thread ID before trying to pass it to the NVTX naming function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ms-windows Related to the Microsoft Windows operating system resolved-on-development
Projects
None yet
Development

No branches or pull requests

2 participants