Skip to content

Conversation

andralex
Copy link
Contributor

FILE_TO_C_STRING creates gigantic files consisting mainly of sequences char(0xNN). Just including such a file takes a long time (e.g. 27 seconds for build/test/unit/nvrts/nvrtc/cute/arch/mma_sm90_gmma_sparse_ext.hpp).

This PR generates files as raw delimited C++ strings. This reduces the cost of compilation by roughly 10x. There are over 500 such files.

bin2hex.cmake Outdated
FILE(READ "${FILENAME}" RAW_CONTENT)

set(RAW_DELIM_END "abc1ae6e1e82e3de")
set(RESULT "static char const ${VARIABLE_NAME}[] = R\"${RAW_DELIM_END}(\n${RAW_CONTENT})${RAW_DELIM_END}\";\n")

Choose a reason for hiding this comment

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

Shouldn't these constexpr static char const...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Just doing my best to preserve compatibility with the previous code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Just doing my best to preserve compatibility with the previous code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Skylion007 thanks, added constexpr

Copy link

github-actions bot commented Aug 8, 2025

This PR has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be labeled inactive-90d if there is no activity in the next 60 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants