Skip to content

Conversation

@rrwinterton
Copy link
Contributor

@rrwinterton rrwinterton commented Jan 31, 2025

This is an update to CPU Info to detect AVX 10.2 Instructions. This is the next version of ISA for x86 AVX 10.

This is the version for the AVX 10 in this case we are testing for AVX 10.2 but it covers the whole 8 bits.
added comments to AVX 10 detection for both AVX10.1 and AVX10.2
src/x86/isa.c Outdated
* AVX 10.2 instructions: avx 10 version information.
* - Intel: ebx[bits 0-7] in structured features info (eax = 24 ecx = 0).
*/
isa.avx10_2 = !!((structured_feature_info2.ebx & UINT32_C(0x000000FF)) >= 2) && isa.avx10_1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove !!
not needed since you have >= 2

per Frank's comment of unneeded !! for comparing version number >= 2
src/x86/isa.c Outdated
(max_base_index >= 7) ? cpuidex(7, 0) : (struct cpuid_regs){0, 0, 0, 0};
const struct cpuid_regs structured_feature_info1 =
(max_base_index >= 7) ? cpuidex(7, 1) : (struct cpuid_regs){0, 0, 0, 0};
const struct cpuid_regs structured_feature_info2 =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent is wrong. should be 1 tab of 8 instead of 4 spaces.
copy the indent from the lines above

fixed white spaces changing incorrect tab and space for alignment.
Update spaces to tabs to fix alignment issues.
fix the spaces to tab at line 50 to fix indenting issue.
@digantdesai
Copy link
Contributor

Thanks @rrwinterton @fbarchard

@digantdesai digantdesai merged commit aaac07e into pytorch:main Feb 3, 2025
1 check passed
@digantdesai
Copy link
Contributor

hmm CI didn't run for some reason :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants