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

[Cuda] Simplify and optimise the getMaxRegistersJitOptionValue utility #2110

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GeorgeWeb
Copy link
Contributor

@GeorgeWeb GeorgeWeb commented Sep 20, 2024

This change simplifies the getMaxRegistersJitOptionValue function as it was previously unclear what the return bool value actually meant, because it doesn't really signify whether the value was valid or not but it was more of a whether the parsing was successful. Instead, we now just return the parsed value if it is successfully parsed, otherwise we return the default.
Additionally, we replace the use of std::stoi with std::from_chars which is much lighter weight (and works well with std::string_views), in order to avoid extra dynamic allocation(s).

@github-actions github-actions bot added the cuda CUDA adapter specific issues label Sep 20, 2024
@GeorgeWeb GeorgeWeb force-pushed the georgi/cuda-update-get-max-regs-jit-option-util branch 2 times, most recently from 9416808 to f106360 Compare September 25, 2024 11:04
@GeorgeWeb GeorgeWeb force-pushed the georgi/cuda-update-get-max-regs-jit-option-util branch 6 times, most recently from 8229565 to fca42e1 Compare November 7, 2024 09:53
@GeorgeWeb GeorgeWeb changed the title [Cuda] Simplify the 'getMaxRegistersJitOptionValue' utility and its use [Cuda] Simplify and optimise the getMaxRegistersJitOptionValue utility Nov 7, 2024
@GeorgeWeb GeorgeWeb force-pushed the georgi/cuda-update-get-max-regs-jit-option-util branch from fca42e1 to 3ffcf27 Compare November 7, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA adapter specific issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant