# benchamx **Repository Path**: zeasa/benchamx ## Basic Information - **Project Name**: benchamx - **Description**: AMX benchmark - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-02-09 - **Last Updated**: 2025-06-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # benchamx: ## Build ``` $ make build ``` If the build step succeeds, the binary `benchamx.out` will be generated in `bin`, and the objects will be generated in `build`. There is a config file named `config.mk`, and user can modify or add build time config variables in the `bulid configs` section. ## Run ``` $ make run ``` It will execute `benchamx.out` according to the runtime configs defined in the `runtime configs` section also in `config.mk`. User can also run `./bin/benchamx.out` directly given runtime arguments as follows: ``` # number of iterations must no less than 10^9 to fully utilize AMX, useless args MNK in tmm level benchmark ./bin/benchamx.out l1 100 10000 64 64 64 ijk ``` The last argument (`ijk`) means loop order of blocks loaded from L2 to L1D (Why only L2 to L1D? Because we are currently working on this level). Note that the runtime loop order should match the build time `L2_LOOP` variable defined in `config.mk`. ## Stats Run scripts in `scripts` directory to get some statistics, including pmc events (and some results caculated based on them, such as cache miss rate), and metrics as output from benchamx itself, such as MAC utilization. ``` $ cd scripts $ ./run.sh ``` Users are free to edit and modify the arguments in `run.sh`. Statistics of interet can also be modified, which are defined in `perf_analyzer.py`, such as `pmc_dict`, matrix `shapes` and output `metrics`. ## Note ### Legacy The original benchamx codebase has been moved to directory `legacy`. Run the following commands to reproduce: ``` $ cd legacy $ make peak.bin $ ./peak.bin -d ``` We will gradually move the benchmarks and optimizations into current codebase. Keep tuned! ### Frequency We assumed that the CPU frequency is 3.126MHz in Intel(R) Xeon(R) w3-2435. In order to stabalize frequency, we need to shut down TurboBoost using the following steps: ``` SHELL # CHECK THE SUPPORT FOR INTEL_PSTATE cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver # SHUT DOWN TEMPORARY echo 1 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo # LOOK UP THE STATUS cat /sys/devices/system/cpu/intel_pstate/no_turbo ``` Use `turbostat` to check the frequency: ``` SHELL sudo turbostat ```