Hello, MXA!#

This guide will walk you through verifying that the MemryX hardware and software are functioning properly in your system. We will accomplish this by downloading, compiling, and running the lightweight model MobileNet, and benchmarking its performance by running 1000 frames of random data through the MemryX Accelerator (MXA).

Note

Ensure you have completed all the steps in the Get Started guide before proceeding.

Verify Installation#

Before proceeding with the model, let’s verify that the MemryX hardware and runtime software are correctly installed. This ensures that the MXA is detected and fully operational on your system. Use the following command to check the health of the MXA connection and retrieve basic information about the accelerator:

mx_bench --hello

Expected Output:

Hello from MXA!

Device ID | Chip Count |  Freq | Volt
----------|------------|-------|-----
        0 |          4 |   600 |  700
acclBench --hello

Expected Output:

Hello from MXA!

Device ID | Chip Count |  Freq | Volt
----------|------------|-------|-----
        0 |          4 |   600 |  700

If you see the output above, your hardware and runtime software are correctly installed, and you can move to the next step. Otherwise, refer to the troubleshooting guide for assistance.

Prepare the Model DFP#

Next, we will download and compile the MobileNet model using the MemryX Neural Compiler. This step will verify that both the compiler and SDK tools are installed and functioning as expected. Run the following command to download and compile the MobileNet model:

python3 -c "import tensorflow as tf; tf.keras.applications.MobileNet().save('mobilenet.h5');"
mx_nc -v -m mobilenet.h5

If you’d like to skip the compilation step, you can download a precompiled DFP from here: mobilenet.dfp.

Expected Output:

╔══════════════════════════════════════╗
β•‘            Neural Compiler           β•‘
β•‘  Copyright (c) 2019-2025 MemryX Inc. β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

════════════════════════════════════════
Converting Model: (Done)
Optimizing Graph: (Done)
Cores optimization: (Done)
Flow optimization: (Done)
. . . . . . . . . . . . . . . . . . . .
Ports mapping: (Done)
MPU 0 input port 0: {'model_index': 0, 'layer_name': 'input_layer', 'shape': [224, 224, 1, 3]}
MPU 3 output port 0: {'model_index': 0, 'layer_name': 'predictions', 'shape': [1, 1, 1, 1000]}
────────────────────────────────────────
Assembling DFP: (Done)
════════════════════════════════════════

Download the precompiled DFP file for MobileNet from mobilenet.dfp. For more models to test, you can download other models from the MemryX Model eXplorer.

If you encounter any issues during this step, please refer to the troubleshooting guide.

Deploy and Benchmark#

Now that the model is compiled, it’s time to deploy it and run a benchmark to test its performance on the MXA hardware. We will run 1000 frames of random data through the accelerator to measure performance metrics.

mx_bench -v -d mobilenet.dfp -f 1000

Expected Output:

╔══════════════════════════════════════╗
β•‘               Benchmark              β•‘
β•‘  Copyright (c) 2019-2025 MemryX Inc. β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Ran 1000 frames
Model: 0
Average FPS: 1526.90
Average System Latency: 1.83 ms

Press the Start menu, type cmd, and left-click on Command Prompt to open it.

Alternatively, you can press Win + R, type cmd, and hit Enter to open the Command Prompt.

Note

Command Prompt does not have to run as administrator for this benchmark tool.

Use the following command to run the benchmark on MobileNet:

acclBench -d mobilenet.dfp -f 1000

You should see output similar to the following:

*************************************************
*      Evaluate dfp performance using MX3       *
*************************************************

Number of chips the dfp is compiled for = 4

    Model    Stream            FPS
-----------------------------------
        0         0         1526.7

    Device       Temp (C)
-------------------------
        0           52.0
Average FPS per stream : 1526.7
Average FPS for DFP    : 1526.7

Bench for 1 Model(s) Done

Congratulations πŸŽ‰! You’ve successfully tested the MemryX hardware and software.

Note

If you do not yet have a MX3 for your system, you can still use the MemryX simulator to run this example. For those instructions, please refer to the Hello, MobileNet page.

Third-Party License#

This tutorial uses third-party models available through the Keras Applications API. Below are the details of the licenses for these dependencies:

See also