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

Tracking Device Memory Usage and Budget #764

Open
Erfan-Ahmadi opened this issue Oct 31, 2024 · 2 comments
Open

Tracking Device Memory Usage and Budget #764

Erfan-Ahmadi opened this issue Oct 31, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Erfan-Ahmadi
Copy link
Contributor

Basically what VK_EXT_memory_budget provides.
reports the current usage and budget on each memory heap.
This extension is not supported good enough for it to be in core Nabla [1].

  1. we can emulate the "usage" by tracking our allocates and frees. (using atomics per device)

The VkPhysicalDeviceMemoryBudgetPropertiesEXT::heapUsage will display the current process estimated heap usage.

  1. We can emulate "budget" heuristically, by returning 80% of total heap size. (like VMA)

The VkPhysicalDeviceMemoryBudgetPropertiesEXT::heapBudget values can be used as a guideline for how much total memory from each heap the current process can use at any given time, before allocations may start failing or causing performance degradation. The values may change based on other activity in the system that is outside the scope and control of the Vulkan implementation.

another option is to not return this at all unless the extension is available and log error and return invalid value?

The extension returns those values per "process" but I don't think we can only track per device.

I would like more feedback on this.
maybe it's just better not to use this extension at all and just track usage per device.

@Erfan-Ahmadi Erfan-Ahmadi added the enhancement New feature or request label Oct 31, 2024
@Erfan-Ahmadi Erfan-Ahmadi self-assigned this Oct 31, 2024
@Erfan-Ahmadi
Copy link
Contributor Author

IDEA: We can adjust our heap budget heuristic when hitting allocation failures.

@Erfan-Ahmadi
Copy link
Contributor Author

https://discord.com/channels/593902898015109131/723305695046533151/1301552319628054550

Yes just shove it in device limits
Fallback paths not worth the man hours of effort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant