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

Fix the error by having manual casting the value to genetic when pass… #67

Merged
merged 2 commits into from
Mar 4, 2020
Merged

Fix the error by having manual casting the value to genetic when pass… #67

merged 2 commits into from
Mar 4, 2020

Conversation

12345swordy
Copy link
Contributor

…ing to the parameter

@12345swordy
Copy link
Contributor Author

This fix only works for debug mode btw.

@m4rs-mt m4rs-mt self-assigned this Feb 19, 2020
Copy link
Owner

@m4rs-mt m4rs-mt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes and this should be good to go.
Furthermore, I am wondering why this fix does not solve the problem in release mode? What about other Intel devices?

Src/ILGPU/Backends/OpenCL/CLCodeGenerator.Values.cs Outdated Show resolved Hide resolved
@12345swordy
Copy link
Contributor Author

12345swordy commented Feb 23, 2020

Furthermore, I am wondering why this fix does not solve the problem in release mode?

Because it currently gives me this error message:

error: initializing 'int *' with an expression of type '__generic int *' changes address space of pointer
private int* var29 = (int*) var12; 

I don't know where to begin with that that.

Is the “–cl-std=CL2.0” flag being explicitly used for release mode ?

@m4rs-mt
Copy link
Owner

m4rs-mt commented Mar 4, 2020

After diving deeper into this issue it turns out that all pointer types should be annotated with the proper "__generic" address space. However, I don't known whether all drivers will accept this code.

@m4rs-mt m4rs-mt merged commit 1a31c15 into m4rs-mt:master Mar 4, 2020
@12345swordy 12345swordy deleted the Debug_AtomicOperationCAS_Fix branch March 8, 2020 00:24
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 this pull request may close these issues.

2 participants