Querying Host Target Info to find whether the host system has the Neon int8 Dot Product Extension using APIs from sys.info (from info Module of sys Package) in Mojo Programming Language

Shriram Sivanandhan
2 min readAug 16, 2024

--

Mojo Programming Language combines the usability of Python with the performance of C, C++ and Rust. Mojo Programming Language utilizes next-generation compiler technologies with features like caching, multithreading and cloud distribution technologies. Further, Auto-Tuning and compile-time Metaprogramming features allows to write code for several hardware. The advantages of Mojo Programming Language are Usability & Programmability, best performance, Interoperability and Extensibility.

As we saw Interoperability of Mojo Programming Language with Python Ecosystem to use Matplotlib Python Visualization Library, Pandas Python Data Analysis and Manipulation Library, NumPy (Fundamental Package for Scientific Computing in Python) Library, SciPy Python Library in Mojo Programming Language and various concepts and implementations regarding Mojo Programming Language in previous Articles/Blogs. In this Article/Blog, we are going to see Querying Host Target Info to find whether the host system has the Neon int8 Dot Product Extension using APIs from sys.info (from info Module of sys Package) in Mojo Programming Language.

Since the older JupyterLab-based Mojo Playground is deprecated, in this Blog, Programming in Mojo is done using the new Mojo Playground.

Querying Host Target Info to find whether the host system has the Neon int8 Dot Product Extension using APIs from sys.info (from info Module of sys Package) in Mojo Programming Language:

We are going to use APIs from sys.info (from info Module of sys Package) in Mojo Programming Language. In Mojo Programming Language, sys.info implements the methods to query host target info.

Printing whether the host system has the Neon int8 Dot Product Extension support or not using has_neon_int8_matmul() function from sys.info (from info Module of sys Package) in Mojo Programming Language
Printing whether the host system has the Neon int8 Dot Product Extension support or not using has_neon_int8_matmul() function from sys.info (from info Module of sys Package) in Mojo Programming Language (New Mojo Playground)

In the above example, we had printed whether the host system has the Neon int8 Dot Product Extension or not using has_neon_int8_dotprod() function from sys.info (from info Module of sys Package).

Thankyou for reading this blog on Querying Host Target Info to find whether the host system has the Neon int8 Dot Product Extension using APIs from sys.info (from info Module of sys Package) in Mojo Programming Language. Programming in Mojo and Mojo Programming concepts will be discussed further.

Reference:

https://docs.modular.com/mojo/manual/

https://docs.modular.com/mojo/manual/basics/

https://docs.modular.com/mojo/stdlib/sys/info

--

--