Use int for int8x4 due to performance overhead of char4 #1569
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.
Loading four int8 elements as char4 is likely to produce more integer instructions. When we use int8 intrinsics (e.g. dp4a), we need packed 32-bit data, which need extra operations for packing int8 elements.
For example, below is a ptx code snippet of
__dp4a((( char4*)(( signed char*)A_shared_local + ((k_inner_outer_outer % 2) * 32)))[0], (( char4*)(( signed char*)B_shared_local + ((k_inner_outer_outer % 2) * 32)))[0], C_local[0]);
We would like to use
ld.shared.u32
in this case so that 32-bit data can be directly loaded.This disables support for vectorized int8 arithmetic operations. Since these operations are used in few cases, we prefer better performance here.