Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a API to check SVE Length support on ARM CPU. (pytorch#255)
This pull request introduces a new feature to the cpuinfo library that adds an API to return the maximum supported Scalable Vector Extension (SVE) vector length on the given ARM CPU. This enhancement will allow users to query and determine the maximum SVE vector lengths on a given ARM CPU, providing better insights and flexibility for optimizing applications that utilize SVE. **Key Features:** **New API Function:** Introduces a single API function - cpuinfo_get_max_arm_sve_length() that returns the maximum SVE Vector Length supported on the given ARM CPU. The function is designed to be easy to integrate with existing code in other projects like PyTorch (pytorch/pytorch#119571) and provides a straightforward interface for querying SVE VL. **Here's the sample output on SVE supported instance:** **Query:** ![test_cpp_aug7](https://github.com/user-attachments/assets/0f55fa37-cf54-4fbf-b1bc-a34a27139869) **Output on SVE256 supported Hardware - Graviton3:** ![test_cpp_output](https://github.com/user-attachments/assets/bef72357-dadd-43e9-8983-33248205782f) Signed-off-by: maajidkhann <[email protected]>
- Loading branch information