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]: Type cast uint to float #1309

Open
malex81 opened this issue Dec 3, 2024 · 0 comments
Open

[BUG]: Type cast uint to float #1309

malex81 opened this issue Dec 3, 2024 · 0 comments
Labels

Comments

@malex81
Copy link

malex81 commented Dec 3, 2024

Describe the bug

When cast uint variable to float IL code will be generated :

  IL_0020:  conv.r.un
  IL_0021:  conv.r4

Then ILGPU compiller interprit conv.r.un as cast to float64 (double). And if host (OpenCL) not support double then it's lead to Exception and not work.

Environment

  • ILGPU version: 1.5.1
  • .NET version: .NET 8
  • Operating system: Windows 10
  • Hardware Intel(R) UHD Graphics

Steps to reproduce

uint a = ... // any operation that return uint
...
float b = a * 6.18; // any operation that initiates cast uint to float
...

Expected behavior

I think we should consider these two lines as one atomic command

Additional context

No response

@malex81 malex81 added the bug label Dec 3, 2024
@malex81 malex81 changed the title [BUG]: <title>Type cast uint to float [BUG]: Type cast uint to float Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant