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

[cuda][windows] error C4703: potentially uninitialized local pointer variable 'Event' used" #2497

Open
ashadrina opened this issue Dec 20, 2024 · 3 comments · May be fixed by #2503
Open

[cuda][windows] error C4703: potentially uninitialized local pointer variable 'Event' used" #2497

ashadrina opened this issue Dec 20, 2024 · 3 comments · May be fixed by #2503

Comments

@ashadrina
Copy link

Build with MSVC fails with an error message "source\adapters\cuda\device.cpp(1257): error C4703: potentially uninitialized local pointer variable 'Event' used". https://github.com/oneapi-src/unified-runtime/blob/76a96238d911500294c709efbb10d0a6661244f6/source/adapters/cuda/device.cpp#L1242C3-L1242C11

It started failing after 5bc8c92 which removes default initializer for CUEvent.

Here was the correct initialization:
8e56347#diff-641b75ae8137280ac68523353cbb6eb8059f8581b35261d7a96d179a478229bcL1238

@kbenzie
Copy link
Contributor

kbenzie commented Dec 20, 2024

This warning is introduced by /W4 but the commit 5bc8c92 also reverted the introduction of /W4 and changed back to /W3.

Are you setting the /W4 flag in your build?

@ashadrina
Copy link
Author

Hi @kbenzie, thank you for looking into this issue. I am building the intel\llvm compiler with CUDA backend support, so no, I am not changing any of the UR configs. It is downloaded and compiled automatically. You can try reproducing the issue with 2024-12-16, 2024-12-18, 2024-12-19 builds , for example, https://github.com/intel/llvm/tree/nightly-2024-12-19

@kbenzie
Copy link
Contributor

kbenzie commented Dec 20, 2024

This would have also failed before the reverted change which only existing on UR main branch for a short time.

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

Successfully merging a pull request may close this issue.

2 participants