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

[type] [bug] Fix global load of CustomFloatType on CUDA #2115

Merged
merged 6 commits into from
Dec 23, 2020

Conversation

Hanke98
Copy link
Contributor

@Hanke98 Hanke98 commented Dec 22, 2020

Related issue = #1905 #2065

Some mistakes were made in global loading on CUDA, which would lead to compilation error. I will point out the bug below.

And also, I added a new test case focusing on this problem in this pr

[Click here for the format server]


taichi/backends/cuda/codegen_cuda.cpp Show resolved Hide resolved
Comment on lines +64 to +83
@ti.kernel
def test(data: ti.f32):
ti.cache_read_only(x)
assert x[None] == data
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Force the x cache read only, to test global loading in codegen_cuda.cpp. Or, the x might be read the function in codegen_llvm.cpp

Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks.

taichi/backends/cuda/codegen_cuda.cpp Show resolved Hide resolved
@Hanke98 Hanke98 force-pushed the debug-cft-global-load branch from 8277c6f to f771b3b Compare December 23, 2020 01:44
@Hanke98 Hanke98 merged commit 111ad8c into taichi-dev:master Dec 23, 2020
@k-ye k-ye mentioned this pull request Jan 5, 2021
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.

3 participants