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

Ambiguous call of OpenCL math functions in some cases #130

Open
dpanfilyonok opened this issue Jan 2, 2022 · 1 comment
Open

Ambiguous call of OpenCL math functions in some cases #130

dpanfilyonok opened this issue Jan 2, 2022 · 1 comment

Comments

@dpanfilyonok
Copy link

Describe the bug
OpenCL's compilation fails with error: call to 'max' is ambiguous on kernel

<@
    fun (range: Range1D) (buf: int16 clarray) ->
        buf.[0] <- max buf.[0] 1s
@>

which translates to

__kernel void brahmaKernel (__global short * buf)
{buf [0] = max (buf [0], 1) ;}

Expected behavior
Compilation is successful.

@gsvgit
Copy link
Member

gsvgit commented Jan 3, 2022

Looks like we should carefully translate constant literals.

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

No branches or pull requests

2 participants