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

[DebugInfo] Round up #elts of TypeVector when calculating memory size #2504

Merged
merged 6 commits into from
Jun 5, 2024

Conversation

LU-JOHN
Copy link
Contributor

@LU-JOHN LU-JOHN commented Apr 15, 2024

Round up number of elements in a Vector to a power of 2 when calculating memory size. Memory size will be calculated as BaseType * bit_ceil(ComponentCount). The previous calculation already rounded 3 elements to 4 elements.

@LU-JOHN LU-JOHN marked this pull request as draft April 15, 2024 18:21
@LU-JOHN LU-JOHN force-pushed the add_memory_size branch 2 times, most recently from 4b205ae to d84af9b Compare April 16, 2024 13:40
@LU-JOHN LU-JOHN marked this pull request as ready for review May 4, 2024 05:04
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
@LU-JOHN LU-JOHN requested a review from MrSidims May 28, 2024 20:31
@LU-JOHN LU-JOHN changed the title [DebugInfo] Add MemorySize field to TypeVector [DebugInfo] Round up #elts of TypeVector when calculating memory size May 29, 2024
@LU-JOHN
Copy link
Contributor Author

LU-JOHN commented May 29, 2024

Adding a "MemorySize" field toTypeVector was considered but rejected. See KhronosGroup/SPIRV-Registry#250

@MrSidims MrSidims merged commit a6398f4 into KhronosGroup:main Jun 5, 2024
9 checks passed
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Jun 6, 2024
…KhronosGroup#2504)

Round up number of elements in a Vector to a power of 2 when calculating memory size. Memory size will be calculated as BaseType * bit_ceil(ComponentCount). The previous calculation already rounded 3 elements to 4 elements.

Signed-off-by: Lu, John <john.lu@intel.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants