Giter Site home page Giter Site logo

m2e's Introduction

m2e

Playground for experimenting with microbenchmarks on Apple Silicon (specifically the T8112 - I'm using this on my 2022 13" MacBook Pro).

NOTE: I can't guarantee this is safe or particularly easy-to-use. You should avoid using this if you don't know what you're doing.

Setup and Usage

These experiments rely on AsahiLinux/m1n1 proxy/hypervisor functionality for interacting with the hardware. Refer to the Asahi Linux documentation for details on setting up m1n1 and the proxy client.

You need to recursively clone this repository because m1n1 is included as a submodule, and we rely on the Python modules defined in m1n1/proxyclient.

$ git clone --recursive https://github.com/eigenform/m2e

My process for using these tools looks like this:

  1. My MacBook is connected to my host machine with a USB3 cable
  2. Start ./m1n1/proxyclient/tools/picocom-sec.sh
  3. Boot with m1n1's proxy mode enabled
  4. Run experiments
  5. When you're done, run ./m1n1/proxyclient/tools/reboot.py, yank the USB3 cable, and let m1n1 boot into Asahi Linux

Bare-metal Rust programs

m2e-rs is a Rust crate that defines a simple runtime environment for executables on top of m1n1 (see m2e-rs/src/bin/template.rs). You probably need to install Rust nightly for this. Since my host machine is x86, I also needed to install the aarch64-unknown-none-gnu target in order to build this. I'm using run-elf.py to load and run the resulting binaries.

Microbenchmarking in m1n1

pym2e/ has some infrastructure for assembling/running/loading small pieces of code. See the following:

  • pht.py - local branch predictor experiments

m2e's People

Contributors

eigenform avatar

Stargazers

 avatar ihsan avatar Jevin Sweval avatar

Watchers

Jevin Sweval avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.