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

Add ociocpuinfo utility #1960

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

markreidvfx
Copy link
Contributor

Adds a very simple utility that prints out the cpu features detected by OCIO.

name           : Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
vendor         : GenuineIntel
hasSSE2        : 1
SSE2Slow       : 0
hasSSE3        : 1
SSE3Slow       : 0
hasSSSE3       : 1
SSSE3Slow      : 0
hasSSE4        : 1
hasSSE42       : 1
hasAVX         : 1
AVXSlow        : 0
hasAVX2        : 1
AVX2SlowGather : 0
hasAVX512      : 0
hasF16C        : 1

This mimics the output of the program shared in #1935 and here.
implements #1937

It is with all the other ocio apps, wasn't sure if this was the best place to put it. I could see being with the test apps too.

I also took the time to simplify the CPUInfo header. There isn't really a need to special case aarch64. We can remove some duplicate code.

Remove unneeded duplicate code h
Handle unknown processors

Signed-off-by: Mark Reid <mindmark@gmail.com>
Signed-off-by: Mark Reid <mindmark@gmail.com>
Copy link
Collaborator

@remia remia left a comment

Choose a reason for hiding this comment

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

Thank you @markreidvfx, looks good to me. I assume we should make it available through the Python wheel? Should be as simple as adding it to the list here.

Copy link
Collaborator

@doug-walker doug-walker left a comment

Choose a reason for hiding this comment

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

Thanks Mark! Will hold off on merging to see if you want to add it to the Wheel as Remi suggested.

@markreidvfx
Copy link
Contributor Author

Yes, please hold off. I will add the executable to the wheel like remi suggested.

Signed-off-by: Mark Reid <mindmark@gmail.com>
Copy link
Collaborator

@doug-walker doug-walker left a comment

Choose a reason for hiding this comment

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

Thanks, will merge after Remi's approval.

@remia
Copy link
Collaborator

remia commented Apr 1, 2024

Thanks @markreidvfx, tested on the macOS wheel and it seem to work just fine.

@doug-walker doug-walker merged commit 865e261 into AcademySoftwareFoundation:main Apr 2, 2024
62 checks passed
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.

Add a utility program to print out which CPU feature sets are supported on a machine
3 participants