Skip to content

[libspirv] Fix image built-in mangled name#21537

Merged
kswiecicki merged 1 commit intointel:syclfrom
wenju-he:fix-libspirv-image-builtin-build
Mar 17, 2026
Merged

[libspirv] Fix image built-in mangled name#21537
kswiecicki merged 1 commit intointel:syclfrom
wenju-he:fix-libspirv-image-builtin-build

Conversation

@wenju-he
Copy link
Copy Markdown
Contributor

Combination of 5aa39a7 and 5947c2a caused new fail: Unable to demangle name: _Z23__spirv_ImageArrayFetchIDv2_cmFETCH_COORD_2_2_c

Combination of 5aa39a7 and 5947c2a caused new fail:
Unable to demangle name: _Z23__spirv_ImageArrayFetchIDv2_cmFETCH_COORD_2_2_c
@Maetveis
Copy link
Copy Markdown
Contributor

Maetveis commented Mar 17, 2026

Just for my own understanding and to help other reviewers:

From the Itanium C++ ABI, Section 5.1.5 Type encodings:

Builtin types are represented by single-letter codes:

  <builtin-type> ::= v	# void
                 ::= w	# wchar_t
                 ::= b	# bool
                 ::= c	# char**
                 ::= a	# signed char
                 ::= h	# unsigned char
 (...)

So this change is due to the signed char -> char change in 5947c2a

Copy link
Copy Markdown
Contributor

@Maetveis Maetveis left a comment

Choose a reason for hiding this comment

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

LGTM.

@Maetveis
Copy link
Copy Markdown
Contributor

I am wondering though, it would be nice to get away from mangling any symbols by hand, is that something you're looking to do @wenju-he?

@wenju-he
Copy link
Copy Markdown
Contributor Author

I am wondering though, it would be nice to get away from mangling any symbols by hand, is that something you're looking to do @wenju-he?

@Maetveis I don't have plan to update ptx image builtin names. IMO ideally they should use/implement SPIR-V builtin rather than templated symbols.

@kswiecicki kswiecicki merged commit 3cf364d into intel:sycl Mar 17, 2026
35 of 36 checks passed
@wenju-he wenju-he deleted the fix-libspirv-image-builtin-build branch March 17, 2026 10:31
@Maetveis
Copy link
Copy Markdown
Contributor

@Maetveis I don't have plan to update ptx image builtin names. IMO ideally they should use/implement SPIR-V builtin rather than templated symbols.

But isn't template based mangling standard for some SPIR-V builtins? I see that there seem to be some Intel extensions like ImageFetchArray, but that's not the only templated symbol.

Maybe we could explore using C++ for these functions, the llvm libc and libc++ is already using it with the NVPTX target.

@wenju-he
Copy link
Copy Markdown
Contributor Author

SPIR-V image builtins don't use templates.

Maybe we could explore using C++ for these functions, the llvm libc and libc++ is already using it with the NVPTX target.

This is a good direction for the PTX image builtin implementation which is templated. I'm not sure if SPIR-V builtins follow that same pattern.

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