Skip to content

libclc: clspv: update gen_convert.cl for clspv #66902

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

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

rjodinchr
Copy link
Contributor

@rjodinchr rjodinchr commented Sep 20, 2023

Add a clspv switch in gen_convert.cl
This is needed as Vulkan SPIR-V does not respect the assumptions
needed to have the generic convert.cl compliant on many platforms.

It is needed because of the conversion of TYPE_MAX and
TYPE_MIN. Depending on the platform the behaviour can vary, but most
of them just do not convert correctly those 2 values.

Because of that, we also need to avoid having explicit function for
simple conversions because it allows llvm to optimise the code, thus
removing some of the added checks that are in fact needed.

@rjodinchr
Copy link
Contributor Author

@kpet @alan-baker could you review this PR please?

@rjodinchr rjodinchr changed the title libclc: clspv: create gen_convert.cl for clspv libclc: clspv: update gen_convert.cl for clspv Mar 14, 2024
Copy link

github-actions bot commented Mar 14, 2024

✅ With the latest revision this PR passed the Python code formatter.

@rjodinchr rjodinchr force-pushed the pr/convert branch 2 times, most recently from a6146bb to 8d2b49e Compare March 14, 2024 10:34
Add a clspv switch in gen_convert.cl
This is needed as Vulkan SPIR-V does not respect the assumptions
needed to have the generic convert.cl compliant on many platforms.

It is needed because of the conversion of TYPE_MAX and
TYPE_MIN. Depending on the platform the behaviour can vary, but most
of them just do not convert correctly those 2 values.

Because of that, we also need to avoid having explicit function for
simple conversions because it allows llvm to optimise the code, thus
removing some of the added checks that are in fact needed.
@kpet kpet merged commit b6193a2 into llvm:main Mar 14, 2024
@rjodinchr rjodinchr deleted the pr/convert branch March 14, 2024 19:59
rjodinchr added a commit to rjodinchr/clspv that referenced this pull request Mar 15, 2024
Build libclc as part of the build system rather than relying on a checked-in
bitcode file. This somewhat increases the duration of the build as clang, opt,
etc are built as dependencies.

Update llvm dep to get llvm/llvm-project#66902

Ref google#826

Based on google#903
rjodinchr added a commit to rjodinchr/clspv that referenced this pull request Mar 15, 2024
Build libclc as part of the build system rather than relying on a checked-in
bitcode file. This somewhat increases the duration of the build as clang, opt,
etc are built as dependencies.

Update llvm dep to get llvm/llvm-project#66902

Ref google#826

Based on google#903
rjodinchr added a commit to rjodinchr/clspv that referenced this pull request Mar 15, 2024
Build libclc as part of the build system rather than relying on a checked-in
bitcode file. This somewhat increases the duration of the build as clang, opt,
etc are built as dependencies.

Update llvm dep to get llvm/llvm-project#66902

Ref google#826

Based on google#903
rjodinchr added a commit to rjodinchr/clspv that referenced this pull request Mar 15, 2024
Build libclc as part of the build system rather than relying on a checked-in
bitcode file. This somewhat increases the duration of the build as clang, opt,
etc are built as dependencies.

Update llvm dep to get llvm/llvm-project#66902

Ref google#826

Based on google#903
rjodinchr added a commit to rjodinchr/clspv that referenced this pull request Mar 15, 2024
Build libclc as part of the build system rather than relying on a checked-in
bitcode file. This somewhat increases the duration of the build as clang, opt,
etc are built as dependencies.

Update llvm dep to get llvm/llvm-project#66902

Ref google#826

Based on google#903
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