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

Can't compile recent XLA for CUDA 11.8 #258

Open
giordano opened this issue Jan 19, 2025 · 0 comments
Open

Can't compile recent XLA for CUDA 11.8 #258

giordano opened this issue Jan 19, 2025 · 0 comments

Comments

@giordano
Copy link
Member

Compiling recent versions of XLA (we're currently trying to target openxla/xla@665f79f + some small patches) requires CUDA v12.3, but we're hacking our way around to get it compile with CUDA 12.1 and 11.8. However there are some challenges because CUDA itself has strict requirements about the version of GCC you can use with it, and for example for CUDA 11.8 that's GCC v11 maximum. Trying to accommodate that and disabling some XLA components which require newer CUDA versions we arrive at a point where other parts of XLA want a newer GCC version than what CUDA allows, for example

[13:53:47] external/com_google_absl/absl/strings/internal/str_format/bind.h: In constructor 'absl::lts_20230802::str_format_internal::FormatSpecTemplate<Args>::FormatSpecTemplate(const absl::lts_20230802::str_format_internal::ExtendedParsedFormat
<absl::lts_20230802::FormatConversionCharSet(C)...>&)':
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/bind.h:172:1: error: parse error in template argument list
[13:53:47]   172 |     CheckArity<sizeof...(C), sizeof...(Args)>();
[13:53:47]       | ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/bind.h:172:63: error: expected ';' before ')' token
[13:53:47]   172 |     CheckArity<sizeof...(C), sizeof...(Args)>();
[13:53:47]       |                                                               ^
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/bind.h:173:147: error: template argument 1 is invalid
[13:53:47]   173 |     CheckMatches<C...>(absl::make_index_sequence<sizeof...(C)>{});
[13:53:47]       |                                                                                                                                                   ^
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/bind.h:173:151: error: expected primary-expression before '{' token
[13:53:47]   173 |     CheckMatches<C...>(absl::make_index_sequence<sizeof...(C)>{});
[13:53:47]       |                                                                                                                                                       ^
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/bind.h:173:151: error: expected ';' before '{' token
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/bind.h:173:153: error: expected primary-expression before ')' token
[13:53:47]   173 |     CheckMatches<C...>(absl::make_index_sequence<sizeof...(C)>{});
[13:53:47]       |                                                                                                                                                         ^
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/arg.h: In instantiation of 'constexpr absl::lts_20230802::FormatConversionCharSet absl::lts_20230802::str_format_internal::ArgumentToConv() [with Arg = unsigned int]':
[13:53:47] external/com_google_absl/absl/strings/str_format.h:271:156:   required by substitution of 'template<class ... Args> using FormatSpec = absl::lts_20230802::str_format_internal::FormatSpecTemplate<absl::lts_20230802::FormatConversionChar
Set((ArgumentToConv<Args>)())...> [with Args = {unsigned int}]'
[13:53:47] external/com_google_absl/absl/strings/str_format.h:391:1:   required by substitution of 'template<class ... Args> absl::lts_20230802::str_format_internal::Streamable absl::lts_20230802::StreamFormat(absl::lts_20230802::FormatSpec<Args
...>&, const Args& ...) [with Args = {unsigned int}]'
[13:53:47] external/com_google_absl/absl/crc/crc32c.h:184:34:   required from here
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: error: no matching function for call to 'ExtractCharSet(ConvResult)'
[13:53:47]   403 |   return absl::str_format_internal::ExtractCharSet(ConvResult{});
[13:53:47]       |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/arg.h:196:1: note: candidate: 'template<absl::lts_20230802::FormatConversionCharSet C> constexpr absl::lts_20230802::FormatConversionCharSet absl::lts_20230802::str_format_inter
nal::ExtractCharSet(absl::lts_20230802::FormatConvertResult<(absl::lts_20230802::FormatConversionCharSet)(C)>)'
[13:53:47]   196 | constexpr FormatConversionCharSet ExtractCharSet(FormatConvertResult<C>) {
[13:53:47]       | ^~~~~~~~~~~~~~
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/arg.h:196:1: note:   template argument deduction/substitution failed:
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: note:   couldn't deduce template parameter 'C'
[13:53:47]   403 |   return absl::str_format_internal::ExtractCharSet(ConvResult{});
[13:53:47]       |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/arg.h:201:1: note: candidate: 'template<absl::lts_20230802::FormatConversionCharSet C> constexpr absl::lts_20230802::FormatConversionCharSet absl::lts_20230802::str_format_inter
nal::ExtractCharSet(absl::lts_20230802::str_format_internal::ArgConvertResult<(absl::lts_20230802::FormatConversionCharSet)(C)>)'
[13:53:47]   201 | constexpr FormatConversionCharSet ExtractCharSet(ArgConvertResult<C>) {
[13:53:47]       | ^~~~~~~~~~~~~~
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/arg.h:201:1: note:   template argument deduction/substitution failed:
[13:53:47] external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: note:   couldn't deduce template parameter 'C'
[13:53:47]   403 |   return absl::str_format_internal::ExtractCharSet(ConvResult{});
[13:53:47]       |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
[13:53:47] external/com_google_absl/absl/crc/crc32c.h: In function 'std::ostream& absl::lts_20230802::operator<<(std::ostream&, absl::lts_20230802::crc32c_t)':
[13:53:47] external/com_google_absl/absl/crc/crc32c.h:184:34: error: no matching function for call to 'StreamFormat(const char [5], uint32_t)'
[13:53:47]   184 |   return os << absl::StreamFormat("%08x", static_cast<uint32_t>(crc));
[13:53:47]       |                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[13:53:47] external/com_google_absl/absl/strings/str_format.h:391:1: note: candidate: 'template<class ... Args> absl::lts_20230802::str_format_internal::Streamable absl::lts_20230802::StreamFormat(absl::lts_20230802::FormatSpec<Args ...>&, const
Args& ...)'
[13:53:47]   391 | ABSL_MUST_USE_RESULT str_format_internal::Streamable StreamFormat(
[13:53:47]       | ^~~~~~~~~~~~
[13:53:47] external/com_google_absl/absl/strings/str_format.h:391:1: note:   substitution of deduced template arguments resulted in errors seen above
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

1 participant