Home Machine Learning An open-source gymnasium for machine studying assisted laptop structure design – Google Analysis Weblog

An open-source gymnasium for machine studying assisted laptop structure design – Google Analysis Weblog

An open-source gymnasium for machine studying assisted laptop structure design – Google Analysis Weblog


Laptop Structure analysis has an extended historical past of growing simulators and instruments to judge and form the design of laptop methods. For instance, the SimpleScalar simulator was launched within the late Nineties and allowed researchers to discover varied microarchitectural concepts. Laptop structure simulators and instruments, equivalent to gem5, DRAMSys, and lots of extra have performed a big position in advancing laptop structure analysis. Since then, these shared sources and infrastructure have benefited trade and academia and have enabled researchers to systematically construct on one another’s work, resulting in important advances within the subject.

Nonetheless, laptop structure analysis is evolving, with trade and academia turning in the direction of machine studying (ML) optimization to satisfy stringent domain-specific necessities, equivalent to ML for laptop structure, ML for TinyML accelerationDNN accelerator datapath optimization, reminiscence controllers, energy consumption, safety, and privateness. Though prior work has demonstrated the advantages of ML in design optimization, the shortage of sturdy, reproducible baselines hinders truthful and goal comparability throughout completely different strategies and poses a number of challenges to their deployment. To make sure regular progress, it’s crucial to know and deal with these challenges collectively.

To alleviate these challenges, in “ArchGym: An Open-Supply Gymnasium for Machine Studying Assisted Structure Design”, accepted at ISCA 2023, we launched ArchGym, which incorporates a wide range of laptop structure simulators and ML algorithms. Enabled by ArchGym, our outcomes point out that with a sufficiently massive variety of samples, any of a various assortment of ML algorithms are able to find the optimum set of structure design parameters for every goal drawback; nobody answer is essentially higher than one other. These outcomes additional point out that deciding on the optimum hyperparameters for a given ML algorithm is crucial for locating the optimum structure design, however selecting them is non-trivial. We launch the code and dataset throughout a number of laptop structure simulations and ML algorithms.

Challenges in ML-assisted structure analysis

ML-assisted structure analysis poses a number of challenges, together with:

  1. For a particular ML-assisted laptop structure drawback (e.g., discovering an optimum answer for a DRAM controller) there is no such thing as a systematic strategy to establish optimum ML algorithms or hyperparameters (e.g., studying charge, warm-up steps, and so forth.). There’s a wider vary of ML and heuristic strategies, from random stroll to reinforcement studying (RL), that may be employed for design area exploration (DSE). Whereas these strategies have proven noticeable efficiency enchancment over their alternative of baselines, it isn’t evident whether or not the enhancements are due to the selection of optimization algorithms or hyperparameters.
    Thus, to make sure reproducibility and facilitate widespread adoption of ML-aided structure DSE, it’s vital to stipulate a scientific benchmarking methodology.
  2. Whereas laptop structure simulators have been the spine of architectural improvements, there may be an rising want to deal with the trade-offs between accuracy, pace, and price in structure exploration. The accuracy and pace of efficiency estimation extensively varies from one simulator to a different, relying on the underlying modeling particulars (e.g., cyclecorrect vs. MLbased mostly proxy fashions). Whereas analytical or ML-based proxy fashions are nimble by advantage of discarding low-level particulars, they often endure from excessive prediction error. Additionally, attributable to business licensing, there will be strict limits on the variety of runs collected from a simulator. General, these constraints exhibit distinct efficiency vs. pattern effectivity trade-offs, affecting the selection of optimization algorithm for structure exploration.
    It’s difficult to delineate easy methods to systematically examine the effectiveness of varied ML algorithms below these constraints.
  3. Lastly, the panorama of ML algorithms is quickly evolving and a few ML algorithms want information to be helpful. Moreover, rendering the result of DSE into significant artifacts equivalent to datasets is crucial for drawing insights concerning the design area.
    On this quickly evolving ecosystem, it’s consequential to make sure easy methods to amortize the overhead of search algorithms for structure exploration. It isn’t obvious, nor systematically studied easy methods to leverage exploration information whereas being agnostic to the underlying search algorithm.

ArchGym design

ArchGym addresses these challenges by offering a unified framework for evaluating completely different ML-based search algorithms pretty. It includes two fundamental parts: 1) the ArchGym atmosphere and a couple of) the ArchGym agent. The atmosphere is an encapsulation of the structure price mannequin — which incorporates latency, throughput, space, vitality, and so forth., to find out the computational price of operating the workload, given a set of architectural parameters — paired with the goal workload(s). The agent is an encapsulation of the ML algorithm used for the search and consists of hyperparameters and a guiding coverage. The hyperparameters are intrinsic to the algorithm for which the mannequin is to be optimized and might considerably affect efficiency. The coverage, however, determines how the agent selects a parameter iteratively to optimize the goal goal.

Notably, ArchGym additionally features a standardized interface that connects these two parts, whereas additionally saving the exploration information because the ArchGym Dataset. At its core, the interface entails three fundamental indicators: {hardware} state, {hardware} parameters, and metrics. These indicators are the naked minimal to determine a significant communication channel between the atmosphere and the agent. Utilizing these indicators, the agent observes the state of the {hardware} and suggests a set of {hardware} parameters to iteratively optimize a (user-defined) reward. The reward is a operate of {hardware} efficiency metrics, equivalent to efficiency, vitality consumption, and so forth. 

ArchGym includes two fundamental parts: the ArchGym atmosphere and the ArchGym agent. The ArchGym atmosphere encapsulates the associated fee mannequin and the agent is an abstraction of a coverage and hyperparameters. With a standardized interface that connects these two parts, ArchGym offers a unified framework for evaluating completely different ML-based search algorithms pretty whereas additionally saving the exploration information because the ArchGym Dataset.

ML algorithms could possibly be equally favorable to satisfy user-defined goal specs

Utilizing ArchGym, we empirically display that throughout completely different optimization goals and DSE issues, a minimum of one set of hyperparameters exists that leads to the identical {hardware} efficiency as different ML algorithms. A poorly chosen (random choice) hyperparameter for the ML algorithm or its baseline can result in a deceptive conclusion {that a} explicit household of ML algorithms is healthier than one other. We present that with enough hyperparameter tuning, completely different search algorithms, even random stroll (RW), are capable of establish the absolute best reward. Nonetheless, word that discovering the proper set of hyperparameters might require exhaustive search and even luck to make it aggressive.

With a enough variety of samples, there exists a minimum of one set of hyperparameters that leads to the identical efficiency throughout a spread of search algorithms. Right here the dashed line represents the utmost normalized reward. Cloud-1, cloud-2, stream, and random point out 4 completely different reminiscence traces for DRAMSys (DRAM subsystem design area exploration framework).

Dataset development and high-fidelity proxy mannequin coaching

Making a unified interface utilizing ArchGym additionally allows the creation of datasets that can be utilized to design higher data-driven ML-based proxy structure price fashions to enhance the pace of structure simulation. To judge the advantages of datasets in constructing an ML mannequin to approximate structure price, we leverage ArchGym’s means to log the info from every run from DRAMSys to create 4 dataset variants, every with a special variety of information factors. For every variant, we create two classes: (a) Numerous Dataset, which represents the info collected from completely different brokers (ACO, GA, RW, and BO), and (b) ACO solely, which exhibits the info collected solely from the ACO agent, each of that are launched together with ArchGym. We prepare a proxy mannequin on every dataset utilizing random forest regression with the target to foretell the latency of designs for a DRAM simulator. Our outcomes present that:

  1. As we enhance the dataset dimension, the typical normalized root imply squared error (RMSE) barely decreases.
  2. Nonetheless, as we introduce range within the dataset (e.g., gathering information from completely different brokers), we observe 9× to 42× decrease RMSE throughout completely different dataset sizes.

Numerous dataset assortment throughout completely different brokers utilizing ArchGym interface.
The influence of a various dataset and dataset dimension on the normalized RMSE.

The necessity for a community-driven ecosystem for ML-assisted structure analysis

Whereas, ArchGym is an preliminary effort in the direction of creating an open-source ecosystem that (1) connects a broad vary of search algorithms to laptop structure simulators in an unified and easy-to-extend method, (2) facilitates analysis in ML-assisted laptop structure, and (3) types the scaffold to develop reproducible baselines, there are a variety of open challenges that want community-wide help. Beneath we define a few of the open challenges in ML-assisted structure design. Addressing these challenges requires a effectively coordinated effort and a neighborhood pushed ecosystem.

Key challenges in ML-assisted structure design.

We name this ecosystem Structure 2.0. We define the important thing challenges and a imaginative and prescient for constructing an inclusive ecosystem of interdisciplinary researchers to deal with the long-standing open issues in making use of ML for laptop structure analysis. If you’re focused on serving to form this ecosystem, please fill out the curiosity survey.


ArchGym is an open supply gymnasium for ML structure DSE and allows an standardized interface that may be readily prolonged to swimsuit completely different use instances. Moreover, ArchGym allows truthful and reproducible comparability between completely different ML algorithms and helps to determine stronger baselines for laptop structure analysis issues.

We invite the pc structure neighborhood in addition to the ML neighborhood to actively take part within the growth of ArchGym. We imagine that the creation of a gymnasium-type atmosphere for laptop structure analysis could be a big step ahead within the subject and supply a platform for researchers to make use of ML to speed up analysis and result in new and modern designs.


This blogpost is predicated on joint work with a number of co-authors at Google and Harvard College. We wish to acknowledge and spotlight Srivatsan Krishnan (Harvard) who contributed a number of concepts to this undertaking in collaboration with Shvetank Prakash (Harvard), Jason Jabbour (Harvard), Ikechukwu Uchendu (Harvard), Susobhan Ghosh (Harvard), Behzad Boroujerdian (Harvard), Daniel Richins (Harvard), Devashree Tripathy (Harvard), and Thierry Thambe (Harvard).  As well as, we might additionally prefer to thank James Laudon, Douglas Eck, Cliff Younger, and Aleksandra Faust for his or her help, suggestions, and motivation for this work. We might additionally prefer to thank John Guilyard for the animated determine used on this submit. Amir Yazdanbakhsh is now a Analysis Scientist at Google DeepMind and Vijay Janapa Reddi is an Affiliate Professor at Harvard.



Please enter your comment!
Please enter your name here