-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
when lambda insert "__device__" "__host__",report error #10455
Comments
Thank you for submitting this issue! We are currently looking into it. |
I am having a hard time reproducing your error, could you provide a simple test case to reproduce the error? Could you also provide the error output? |
Hi @lishi8168797 . It looks like you're using CUDA. Is the code you posted in an If you're currently using a Unfortunately, simply changing the language ID of the document to "CUDA C++" in the editor is insufficient to cause the C/C++ Extension to treat the file as CUDA. I've opened #10494 to address that specific scenario. |
@browntarik |
@Colengms yes,I am using CUDA,and it is a .cu file,but it still report this red line,and make other code after it also have red line,it bother me. |
Can you provide the output of running the C/C++: Log Diagnostics command and/or look in that logging for an misconfiguration? I'm guessing you may need to set your compilerPath to the nvcc compiler or make sure gcc isn't being used instead. |
sorry,I may not understand that "Can you provide the output of running the C/C++",because,this code run correct,it only report this error in vscode. Does C/C++ Extension provied "insert device in a lambda"? |
The C/C++: Log Diagnostics command is run from the VS Code command palette -- it can show what IntelliSense configuration is being used. It looks like something is causing the CUDA configuration to fail. @Colengms might have more info when he gets back. |
@sean-mcmanus -------- Diagnostics - 2023/2/10 10:26:20 ------- Workspace parsing diagnostics ------- |
Your logging does indicate that it's compiling in CUDA mode, so that looks like |
Hi @lishi8168797 . If your file is being correctly interpreted as CUDA, and your code compiles properly, perhaps there is an issue with IntelliSense resulting in Can you provide a simple isolated example that we might pass along to our IntelliSense team, to further investigate the issue? |
Hi @Colengms .This is my example,thanks for your help.
|
Hi @lishi8168797 . I've opened an internal issue (1746549) against VS, as this issue is with the IntelliSense parser which is shared with VS. |
The fix is available with 1.15.0 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.15.0 |
It works well ! Thank you very much ! |
Environment
Bug Summary and Steps to Reproduce
please see red line
it can compile,but in vscode it report error and has a red line
Configuration and Logs
Other Extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: