Repository navigation
Conversation
…024 GiB With the floor at 1024 GiB, cuInit fails every time with CUDA_ERROR_OUT_OF_MEMORY (2), so KYTY_CUDA_EARLY_INIT=1 does nothing and Smooth Motion stays off. CUDA wants its range below 1 TiB. I checked this by holding every free range below a floor and calling cuInit in a plain process (RTX 5070 Ti, driver 617.42): 512 and 1008 GiB work, 1024 GiB fails. Inside the emulator 1008 GiB failed too, because CUDA asked for more room there, and 944 GiB worked. So the floor is now searched. The first try is the end of the guest range, which leaves guest VA alone when CUDA fits above it. A failed cuInit can be retried, so on failure the floor drops 64 GiB at a time. If CUDA ends up inside the guest range, the startup line says how many MiB it took. KYTY_CUDA_VA_FLOOR_GB still forces a single floor, now without the 1024 GiB minimum. The end of the guest range moves to kernel/memory.h as GUEST_ADDRESS_SPACE_END, and HOST_USER_MAX is derived from it, so the floor follows if the guest range ever changes. Tested with Astro Bot. Kyty prints "CUDA: initialized with the floor at 944 GiB, inside the guest address space (ends at 1008 GiB): CUDA holds 57431 MiB of guest VA", and the NvPresent log shows "Feature Smooth Motion requested. System support: 1. Device support: 1" followed by its swapchain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the floor at 1024 GiB, cuInit fails every time with CUDA_ERROR_OUT_OF_MEMORY (2), so KYTY_CUDA_EARLY_INIT=1 does nothing and Smooth Motion stays off. CUDA wants its range below 1 TiB. I checked this by holding every free range below a floor and calling cuInit in a plain process (RTX 5070 Ti, driver 617.42): 512 and 1008 GiB work, 1024 GiB fails. Inside the emulator 1008 GiB failed too, because CUDA asked for more room there, and 944 GiB worked.
So the floor is now searched. The first try is the end of the guest range, which leaves guest VA alone when CUDA fits above it. A failed cuInit can be retried, so on failure the floor drops 64 GiB at a time. If CUDA ends up inside the guest range, the startup line says how many MiB it took. KYTY_CUDA_VA_FLOOR_GB still forces a single floor, now without the 1024 GiB minimum.
The end of the guest range moves to kernel/memory.h as GUEST_ADDRESS_SPACE_END, and HOST_USER_MAX is derived from it, so the floor follows if the guest range ever changes.