+ All Categories
Home > Documents > iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep...

iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep...

Date post: 22-Aug-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
15
iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep Learning Acceleration Hao Yan, Student Member, IEEE, Hebin R. Cherian, Student Member, IEEE, Ethan C. Ahn, Member, IEEE, Xuehai Qian, Member, IEEE, and Lide Duan , Member, IEEE Abstract—A large variety of applications rely on deep learning to process big data, learn sophisticated features, and perform complicated tasks. Utilizing emerging non-volatile memory (NVM)’s unique characteristics, including the crossbar array structure and gray-scale cell resistances, to perform neural network (NN) computation is a well-studied approach in accelerating deep learning applications. Compared to other NVM technologies, STT-MRAM has its unique advantages in performing NN computation. However, the state-of-the-art research have not utilized STT-MRAM for deep learning acceleration due to its device- and architecture-level challenges. Consequently, this paper enables STT-MRAM, for the first time, as an effective and practical deep learning accelerator. In particular, it proposes a full-stack framework iCELIA spanning multiple design levels, including device-level fabrication, circuit-level enhancements, architecture-level synaptic weight quantization, and system-level accelerator design. The primary contributions of iCELIA over our prior work CELIA include a new non-uniform weight quantization scheme and much enhanced accelerator system design. The proposed framework significantly mitigates the model accuracy loss due to reduced data precision in a cohesive manner, constructing a comprehensive STT-MRAM accelerator system for fast NN computation with high energy efficiency and low cost. Index Terms—STT-MRAM, deep learning acceleration, processing-in-memory, device and architecture co-design Ç 1 INTRODUCTION D EEP learning has recently shown extensive usage in a wide variety of applications, such as image/speech recognition, self-driving cars, financial services, healthcare, etc. For example, convolutional neural networks (CNNs) have led to great successes in image classification, improv- ing the top-5 accuracy of ImageNet [1] from 84.7 percent in 2012 to 96.4 percent in 2015. The recent successes of machine learning and deep learning are due to [2]: (1). the explosive development of information available for model training; (2). the fast increase of computing capacity; and (3). the development of large, generic open source frame- works. In particular, machine learning is becoming a major driving force for high performance computing [3]. There- fore, accelerating training and inference of deep learning models has been a recent focus in designing various com- puting systems ranging from embedded devices to data center servers. Deep learning applications are highly computation and memory intensive, dynamically and frequently accessing large amounts of data with low locality. As a result, the main memory has become a fundamental bottleneck in both performance and energy efficiency when running these applications. Conventional DRAM-based main mem- ory is facing critical challenges in both latency and scalabil- ity. The DRAM latency has remained nearly unchanged in recent generations [4], and it has been extremely difficult to scale DRAM to have larger capacities [5]. Consequently, emerging non-volatile memories (NVM), including phase- change memory (PCM) [6], spin transfer torque magnetoresis- tive RAM (STT-MRAM) [7], and metal-oxide-based resistive RAM (RRAM) [8], are being investigated as replacements for DRAM. A wide variety of benefits can be obtained in NVM-based main memories, including low idle power, no data refreshes, non-destructive reads, nearly infinite data retention time, etc. These advantages make NVM a tempting solution to redesign the memory hierarchy in computer systems. In addition to data storage, NVMs have also been used to perform neural network (NN) computation through their crossbar array structure [9], [10], [11]. In such processing- in-NVM NN accelerators, input data are represented using wordline voltages, and synaptic weights are programmed into cell conductance; the resulting bitline current gives the NN calculation result. In these designs, however, data preci- sion is reduced in synaptic weights since only a limited num- ber of resistance states are available in a NVM cell to represent the synaptic weight programmed in it. Similarly, input data precision is also reduced in the digital-to-analog conversion (DAC) from binaries to wordline voltages. As a consequence, the inference accuracy of the deep learning model is ultimately reduced. H. Yan is with Samsung, Austin, TX 78746. E-mail: [email protected]. H. R. Cherian and E. C. Ahn are with the Department of Electrical and Computer Engineering, University of Texas at San Antonio, San Antonio, Texas 78249. E-mail: {hebin.cherian, chiyui.ahn}@utsa.edu. X. Qian is with the Ming Hsieh Department of Electrical Engineering and the Department of Computer Science, University of Southern California, Los Angeles, CA 90089. E-mail: [email protected]. L. Duan is with the Computing Technology Lab, Alibaba DAMO Acad- emy, Sunnyvale, CA 94085. E-mail: [email protected]. Manuscript received 8 Nov. 2018; revised 14 June 2019; accepted 7 Aug. 2019. Date of publication 26 Aug. 2019; date of current version 26 Dec. 2019. (Corresponding author: Lide Duan.) Recommended for acceptance by M. D. Santambrogio. Digital Object Identifier no. 10.1109/TPDS.2019.2937517 408 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 31, NO. 2, FEBRUARY 2020 1045-9219 ß 2019 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See ht_tp://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.
Transcript
Page 1: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

iCELIA: A Full-Stack Framework forSTT-MRAM-Based Deep Learning Acceleration

Hao Yan, Student Member, IEEE, Hebin R. Cherian, Student Member, IEEE, Ethan C. Ahn,Member, IEEE,

Xuehai Qian,Member, IEEE, and Lide Duan ,Member, IEEE

Abstract—A large variety of applications rely on deep learning to process big data, learn sophisticated features, and perform

complicated tasks. Utilizing emerging non-volatile memory (NVM)’s unique characteristics, including the crossbar array structure and

gray-scale cell resistances, to perform neural network (NN) computation is a well-studied approach in accelerating deep learning

applications. Compared to other NVM technologies, STT-MRAM has its unique advantages in performing NN computation. However,

the state-of-the-art research have not utilized STT-MRAM for deep learning acceleration due to its device- and architecture-level

challenges. Consequently, this paper enables STT-MRAM, for the first time, as an effective and practical deep learning accelerator. In

particular, it proposes a full-stack framework iCELIA spanning multiple design levels, including device-level fabrication, circuit-level

enhancements, architecture-level synaptic weight quantization, and system-level accelerator design. The primary contributions of

iCELIA over our prior work CELIA include a new non-uniform weight quantization scheme and much enhanced accelerator system

design. The proposed framework significantly mitigates the model accuracy loss due to reduced data precision in a cohesive manner,

constructing a comprehensive STT-MRAM accelerator system for fast NN computation with high energy efficiency and low cost.

Index Terms—STT-MRAM, deep learning acceleration, processing-in-memory, device and architecture co-design

Ç

1 INTRODUCTION

DEEP learning has recently shown extensive usage in awide variety of applications, such as image/speech

recognition, self-driving cars, financial services, healthcare,etc. For example, convolutional neural networks (CNNs)have led to great successes in image classification, improv-ing the top-5 accuracy of ImageNet [1] from 84.7 percentin 2012 to 96.4 percent in 2015. The recent successes ofmachine learning and deep learning are due to [2]: (1). theexplosive development of information available for modeltraining; (2). the fast increase of computing capacity; and(3). the development of large, generic open source frame-works. In particular, machine learning is becoming a majordriving force for high performance computing [3]. There-fore, accelerating training and inference of deep learningmodels has been a recent focus in designing various com-puting systems ranging from embedded devices to datacenter servers.

Deep learning applications are highly computation andmemory intensive, dynamically and frequently accessing

large amounts of data with low locality. As a result, themain memory has become a fundamental bottleneck inboth performance and energy efficiency when runningthese applications. Conventional DRAM-based main mem-ory is facing critical challenges in both latency and scalabil-ity. The DRAM latency has remained nearly unchanged inrecent generations [4], and it has been extremely difficultto scale DRAM to have larger capacities [5]. Consequently,emerging non-volatile memories (NVM), including phase-changememory (PCM) [6], spin transfer torquemagnetoresis-tive RAM (STT-MRAM) [7], and metal-oxide-based resistiveRAM (RRAM) [8], are being investigated as replacementsfor DRAM. A wide variety of benefits can be obtained inNVM-based main memories, including low idle power, nodata refreshes, non-destructive reads, nearly infinite dataretention time, etc. These advantages make NVM a temptingsolution to redesign the memory hierarchy in computersystems.

In addition to data storage, NVMs have also been used toperform neural network (NN) computation through theircrossbar array structure [9], [10], [11]. In such processing-in-NVM NN accelerators, input data are represented usingwordline voltages, and synaptic weights are programmedinto cell conductance; the resulting bitline current gives theNN calculation result. In these designs, however, data preci-sion is reduced in synaptic weights since only a limited num-ber of resistance states are available in a NVM cell torepresent the synaptic weight programmed in it. Similarly,input data precision is also reduced in the digital-to-analogconversion (DAC) from binaries to wordline voltages. As aconsequence, the inference accuracy of the deep learningmodel is ultimately reduced.

� H. Yan is with Samsung, Austin, TX 78746. E-mail: [email protected].� H. R. Cherian and E. C. Ahn are with the Department of Electrical and

Computer Engineering, University of Texas at San Antonio, San Antonio,Texas 78249. E-mail: {hebin.cherian, chiyui.ahn}@utsa.edu.

� X. Qian is with the Ming Hsieh Department of Electrical Engineering andthe Department of Computer Science, University of Southern California,Los Angeles, CA 90089. E-mail: [email protected].

� L. Duan is with the Computing Technology Lab, Alibaba DAMO Acad-emy, Sunnyvale, CA 94085. E-mail: [email protected].

Manuscript received 8 Nov. 2018; revised 14 June 2019; accepted 7 Aug. 2019.Date of publication 26 Aug. 2019; date of current version 26 Dec. 2019.(Corresponding author: Lide Duan.)Recommended for acceptance by M. D. Santambrogio.Digital Object Identifier no. 10.1109/TPDS.2019.2937517

408 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 31, NO. 2, FEBRUARY 2020

1045-9219� 2019 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See ht _tp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 2: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

In this paper, we propose a comprehensive frameworknamed iCELIA, which is an improved version of our priorwork CELIA [12], to tackle the above model accuracy reduc-tion problem. We highlight two key features of CELIA/iCE-LIA. First, CELIA/iCELIA is the first STT-MRAM-based NNaccelerator. Existing NVM-based accelerators [9], [10], [11],[13] are all based on RRAM (memristors). Using STT-MRAM crossbar arrays as the accelerator achieves uniquebenefits but also incurs new challenges (Section 3) that willbe addressed by iCELIA. Second, CELIA/iCELIA enablesa full-stack solution for deep learning acceleration acrossmultiple design levels. At the device level (Section 4), it fab-ricates STT-MRAM devices to have multiple resistancestates in a cell; at the circuit level (Section 6), it connects twoSTT-MRAM cells in parallel to create sufficient resistancesneeded by the application; at the architecture level(Section 5), it proposes two novel data quantization schemesthat can better utilize the enabled resistance states to repre-sent the deep learning model; and at the system level(Section 7), it showcases the detailed design of a deep learn-ing accelerator with improved performance and energy effi-ciency. The primary contributions of iCELIA over our priorwork CELIA include a new non-uniform weight quantiza-tion scheme (Section 5.3 and Section 6) and much enhancedaccelerator system design (Section 7.2).

Consequently, our proposed full-stack framework signif-icantly mitigates the model accuracy loss due to reduceddata precision in a cohesive manner, constructing a compre-hensive STT-MRAM accelerator system for fast NN compu-tation with high energy efficiency and low cost. iCELIA isparticularly useful for data center designs for machinelearning due to its processing-in-memory (PIM) characteris-tics, which co-locate computation with memory storage toenable large volumes of low cost, computation-storagehybrid NVM devices.

The main contributions of this paper can be summa-rized as:

� Creating multiple resistance states in a STT-MRAM cell.Our device-level innovation relies on the strongdependence of the STT-MRAM cell resistance on theapplied bias voltage. We carefully control the biasvoltage sweep and its cycling history. This generatesmultiple intermediate resistance states in a STT-MRAM cell, thus improving the data precision of thesynaptic weights stored in cells and ultimatelyachieving higher application inference accuracy.

� Non-uniform quantization for synaptic weights. Moti-vated by the observation that the most importantquantization points of synaptic weights are not uni-formly distributed, we propose two non-uniformquantization schemes to identify the most importantsynaptic weight quantization points to the modelinference. Hence, the same limited number of resis-tance states, when non-uniformly configured, canbetter represent the application model and minimizethe inference accuracy loss due to reduced data pre-cision of synaptic weights.

� Circuit-level enhancements for bridging the gap betweendevice and architecture innovations. Our proposed non-uniformweight quantization schemes, althoughmuch

better representing deep learning applications thanexisting schemes, still need more resistance states in aSTT-MRAM cell than that can be provided by thedevice-level. In order to bridge the gap, we furtherpropose circuit-level enhancements to connect twocells in parallel to represent a synaptic weight. As aresult, sufficient non-uniform resistance states can becreated to make the proposed device and architecturesolutions feasible.

� A system design for deep learning acceleration. Wefinally propose a detailed accelerator system to pro-cess CNNs in STT-MRAM in a pipelined manner.The proposed system contains unique innovations,including novel crossbar array allocation, energyefficient digital-to-analog and analog-to-digital con-versions (DAC/ADC), logic for various NN func-tionality, etc., that greatly improve performance andenergy efficiency over the state-of-the-art.

2 BACKGROUND

2.1 Deep Learning Basics

Deep learning applications utilize big artificial neural net-works to perform machine learning tasks. Typical examplesinclude deep neural networks (DNNs) and convolutionalneural networks. A DNN is a neural network with morethan three (typically 5 to over 1000) layers. A CNN is com-posed of several layers of neurons connected in a specificpattern and specialized for classifying images. As illustratedin Fig. 1, a typical CNN model includes interleaved convo-lutional (CONV) and pooling layers, followed by a numberof fully connected (FC) layers.

A CONV layer takes a number of input feature maps,convolving with synaptic weight kernels (i.e., filters) to gen-erate a number of output feature maps. As shown in thefigure, each pixel in an output feature map is the summa-tion of dot-products between data windows from all inputfeature maps and the same number of kernels. To calculatethe pixel at the same location in another output featuremap, a different set of synaptic weight kernels are used; tocalculate other pixels in the same output feature map, datawindows move around input feature maps with a certainstride to provide data for the convolution. A non-linear acti-vation function, e.g., ReLU or Sigmoid, is usually applied tothe convolution result. A pooling layer down-sizes the fea-ture maps by shrinking a block of input pixels into a singleoutput pixel. For example, max pooling simply uses the

Fig. 1. An illustration of a typical CNN model.

YAN ET AL.: ICELIA: A FULL-STACK FRAMEWORK FOR STT-MRAM-BASED DEEP LEARNING ACCELERATION 409

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 3: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

pixel with the largest value to represent a block of inputpixels. As a result, after several interleaved CONV andpooling layers, the number of feature maps gets larger buttheir sizes are increasingly smaller. These feature maps arefinally flattened to form a feature vector (shown in thefigure), which is used as the input to a FC layer that per-forms fully connected NN computation (i.e., multi-layerperception) to generate an output feature vector. After afew FC layers, the values in the final output feature vectorindicate the probabilities of different categories that theinput image belongs to. Since large amounts of synapticweights are used in large numbers of computations acrossall the layers, CNNs are highly computation and memoryintensive [14].

2.2 Deep Learning Accelerators

The computations incurred in CNNs are mostly floating-point number multiply-and-accumulates (MACs), due tomatrix/vector multiplications and additions. Acceleratingsuch NN computation in hardware, as shown in Fig. 2 (left),can be performed via a co-processor such as GPUs [15],FPGA devices [14], or ASIC devices. Custom ASIC devi-ces [3], [16], [17], [18] have shown extensive usage in deeplearning acceleration due to their high energy efficiency andlow cost. Alternatively, recent studies [9], [10], [11], [13]have utilized non-volatile memory to perform NN compu-tation in a processing-in-memory manner. NVM-basedaccelerators rely on NVM’s unique crossbar structure toconduct matrix-vector multiplications. Fig. 2 (right) per-forms a typical NN operation bj ¼

P2i¼1 ai � wij, where j

ranges from 1 to 2. The input data ai is applied as analoginput voltages on the horizontal wordlines; the synapticweights wij are programmed into the NVM cell conductance(i.e., 1 / cell resistance). The resulting current I flowing outof the vertical bitline indicates the calculation result bj.

2.3 STT-MRAM Basics

STT-MRAM is an emerging and increasingly popular non-volatile memory technology, and is being considered toreplace multiple levels of the memory hierarchy [7]. Itachieves a variety of benefits over DRAM, including lowidle power, non-volatility, non-destructive reads, betterscalability, etc. As depicted in Fig. 3, a STT-MRAM cell con-tains one access transistor and one magnetic tunnel junction(MTJ). As opposed to DRAM using electrical charge incapacitors, STT-MRAM relies on the MTJ resistance to storedata. Within the MTJ, two ferromagnetic layers are sepa-rated by an oxide barrier layer; the magnetization directionis fixed in one of the ferromagnetic layers (“Fixed Layer”),

but can be altered in the other layer (“Free Layer”). Hence,the magnetization directions of the two ferromagnetic layerscan be anti-parallel or parallel, representing the logical “1”(with the high resistance state or HRS) and the logical “0”(with the low resistance state or LRS), respectively.The resistances of the two cell states are denoted as RAP

and RP , respectively, and the ON/OFF resistance ratio ofSTT-MRAM is defined as RAP=RP .

3 MOTIVATION AND OVERVIEW

3.1 Benefits of Using STT-MRAM for NNComputation

Compared to other NVM technologies, STT-MRAM has itsunique advantageswhen being used for deep learning accelera-tion. First, STT-MRAM has orders of magnitude longer celllifetime than PCM and RRAM. PCM employs a destructivewrite mechanism that limits its endurance to less than 1012

cycles [19]; cutting-edge RRAM cells also demonstrate endur-ance of at most 1012 cycles [20]. In contrast, bit flipping in aSTT-MRAMcell is done in a non-destructiveway, resulting inprogramming endurance of 1015 cycles [21]. This highly cycla-ble feature of STT-MRAMcan enable continuous cell reconfig-uration to process and learn new features for deep learning.

Second, STT-MRAM has great potential to induce complexand tunable resistance dynamics through the mechanism ofspin transfer torque [22]. Similar to PCM and RRAM, STT-MRAM can emulate synapses using intermediate resistancestates of theMTJ. Additionally, theMTJ resistance can oscillateand spike, exhibiting complex dynamics to implement otherimportant biological functions such as nanoscale neurons. Incontrast, this is not readily possible in otherNVM technologieswhere additional passive circuit elements such as capacitors orinductors are necessary to oscillate the resistance.

Furthermore, STT-MRAM is compatible with CMOS [23],and is now in a close-to-market position towards its com-mercialization. For example, high-density (256 MB) STT-MRAM storage has recently been demonstrated by Ever-spin [24]. The enhanced maturity of STT-MRAM will enablemore practical experiments for neuromorphic computing.

3.2 Challenges

Despite the various benefits, STT-MRAM has been littleexploited for accelerating deep learning. Instead, the state-of-the-art NVM accelerators have largely focused on usingRRAM [9], [10], [11], [13]. This is primarily due to the

Fig. 2. The co-processor approach (left) versus the processing-in-NVMapproach (right) in accelerating NN computation.

Fig. 3. A STT-MRAM cell.

410 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 31, NO. 2, FEBRUARY 2020

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 4: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

challenges in maintaining NN model accuracy across thedevice and architecture levels. As illustrated in Section 2.2,NVM-based NN computation requires programming syn-aptic weights into NVM cell conductance (resistance). Sincea NVM cell only has a limited number of resistance states,the synaptic weight that it represents has largely reduced dataprecision, which in turn lowers the NN model accuracy. Thissituation is exacerbated in STT-MRAM because of itsdevice-level characteristics.

At the device level, STT-MRAM encounters a significantchallenge that prevents it from being practically used for NNcomputation. The ON/OFF resistance ratio, defined asRAP=RP , is extremely low in STT-MRAM.Compared to a typi-cal ON/OFF ratio of 102 to 104 in RRAMand PCM, the highestON/OFF ratio ever reported for STT-MRAM was just about7 [25]. This significantly limits the possible resistance range ofintermediate resistance states in a cell. Our device-level inno-vation (Section 4) will address this issue by creating multiplereliable resistance states in a STT-MRAMcell.

The second challenge is generic for all NVM types, and isrelated to how the limited cell resistance states are used torepresent the original NN model. Due to the improvedenergy efficiency and reduced area in designing hardware,the fixed-point number representation [26] is typically usedto represent real numbers in NN accelerators. Fig. 4 givesan example of such fixed-point numbers with 8-bit preci-sion. The bit width (bw) comprises all the bits in the repre-sentation, within which the leftmost bit is the sign bit, andthe bits before/after the radix point represent the integerand fractional parts, respectively. Fixed-point numbers fol-low the two’s complement representation, in which case apositive number (with the sign bit being 0) can be calculatedas: n ¼ Pbw�2

i¼0 bi � 2i � 2�fl. Note that, by changing theposition of the radix point, the fractional length (fl) can benegative, within [0, bw� 1], or even larger than bw� 1.Larger values of bw and fl enable higher data precision.

When a 32-bit synaptic weight is programmed into theconductance of a NVM cell, its bit width is effectivelyreduced from 32 to a small number. This is equivalent tomapping the original weight value to one of the 2bw quanti-zation points within the range of [�2bw�1�fl, 2bw�1�fl]. Thisdata quantization process can be visualized in Fig. 5, whereg(x) is the synaptic weight distribution of some NN model.For example, if bw ¼ 3 and fl ¼ 2, eight quantization pointsare uniformly distributed within ½�1; 1�, and are used torepresent 3-bit synaptic weights stored in NVM cells. Exist-ing NN accelerators [3], [9], [14], [16] leverage such uniformquantization to represent synaptic weights. However, weobserve that the uniform quantization points used by thefixed-point number representation are not equally important.Consequently, our architecture-level innovation (Section 5)will propose two non-uniform data quantization schemes

that assign more quantization points to the weight rangesthat are more important to the model inference, thus bettercharacterizing the original NN model and minimizing themodel accuracy loss due to the reduced bit width.

3.3 Overview of this Work

Our proposed framework iCELIA builds upon our priorwork CELIA [12], tackling the above challenges across mul-tiple design levels and enabling a full-stack solution forSTT-MRAM-based deep learning acceleration for the firsttime. Section 4 conducts device-level experiments that dem-onstrate multiple (4, at this point) resistance states in a hard-ware STT-MRAM cell. By connecting two STT-MRAM cellsin parallel to store a synaptic weight (Section 6), iCELIAobtains sufficient resistance states for the two proposedarchitecture-level weight quantization schemes (Section 5)to achieve negligible model accuracy loss. Finally, iCELIAprovides a detailed system-level design (Section 7) showingsignificantly improved performance and energy efficiencyover a state-of-the-art RRAM accelerator [11].

4 CREATING MULTIPLE RESISTANCE STATES IN A

STT-MRAM CELL

4.1 Device-Level Solution

Our device-level work aims at creating multiple resistancestates in a STT-MRAM cell. As mentioned in Section 3, thisis particularly challenging in STT-MRAM due to its lowON/OFF resistance ratio. Our proposed solution is inspiredby two observations: (1). the STT-MRAM cell’s anti-parallel(AP) state resistance is strongly dependent on the appliedbias voltage; and (2). the AP state resistance also showsdependence on the voltage sweeping history. These twoobservations are demonstrated in Fig. 6, which shows the

Fig. 4. A fixed-point number with 8-bit precision.

Fig. 5. An illustration of uniform data quantization.

Fig. 6. The STT-MRAM cell resistance-voltage (R-V) characteristicsobtained with three bias voltage sweeps.

YAN ET AL.: ICELIA: A FULL-STACK FRAMEWORK FOR STT-MRAM-BASED DEEP LEARNING ACCELERATION 411

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 5: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

STT-MRAM cell’s resistance-voltage (R-V) switching char-acteristics obtained from our device-level experiments.

We first conducted a bias voltage sweep from �1V to 1Vthen back to �1V , generating a typical hysteretic R-V charac-teristic shown as the purple trend in the figure. As can be seen,RAP reaches itsmaximumvalue at the zero bias, and decreasesas the bias voltage increases in either positive or negativepolarity direction. Conventionally, this strong dependence onthe bias voltage has long been considered as a challenge inretrieving the stored data, since only a low voltage near zerocan be applied in order tomaximize the read-out signal. In thiswork, however, we take advantage of this unique behavior toutilize the bias dependence to create enough room for interme-diate resistance states. In contrast, the parallel (P) state resis-tance barely changes during the voltage sweep. The SETswitching (AP-to-P state transition) occurs at around 0:5V ,whereas the RESET switching (P-to-AP state transition) occursat around�0:6V . These state transition regions are too abruptto create reliable intermediate resistance states. One priorstudy [27] created multiple resistance levels in the AP-to-Pstate transition region by controlling the domain-wall motionin the magnetic free layer; however, due to the stochasticnature of the domain wall pinning, the fabricated magneticmemristor synapse exhibited large cycle-to-cycle and device-to-device variations that may impede its practical usage inneuromorphic computing. Hence, our solution will target theAP state region in the R-V characteristic.

The second observation suggests that it is possible to obtaindifferent resistance values at the AP state by controlling thevoltage sweep and its cycling history. We have conductedanother two voltage sweeps that generate the black trend (forSweep #2) and the blue trend (for Sweep #3) in Fig. 6. The sec-ond sweep changes the voltage from 0:4V to�0:2V , resultingin a resistance value that is lower than that in the initial fullsweep. On the contrary, the third sweep varies the voltagefrom �0:2V to 0:4V , and yields another resistance valuehigher than that in the first sweep. Therefore, by carefully con-trolling the bias voltage sweeping history (including the start-ing voltage and the sweeping direction), creating newresistance states in a STT-MRAM cell is possible. These newresistance states may be attributed to the increase or decreasein the number of spin-polarized electrons in the free layer,depending on the direction of the current flow.

4.2 Device-Level Experiments

Our device-level experiments were conducted on fully func-tional, nanoscale STT-MRAM devices fabricated throughour industry collaborator. These STT-MRAM samples fea-ture the cutting-edge perpendicular MTJ (p-MTJ) technol-ogy with a TMR ratio (i.e., ðRAP �RP Þ=RP ) of greater than100 percent and a very low resistance-area (RA) product ofabout 10Vmm2. The p-MTJ stack was deposited on 300mmwafers by an Applied Materials’ Endura sputtering system.

Fig. 7 demonstrates four distinct resistance states obtainedin our experiment with a STT-MRAM cell. They all belong tothe AP state of the cell, and are each configured with a differ-ent bias voltage sweep. More importantly, these new statesshow non-uniform resistance values with, for instance, the“01” state being closer to the “00” state than the “10” state.These non-uniform intermediate resistance states, which areconfigured by controlling the voltage sweeping direction and

the time delay between adjacent sweep operations, will pro-vide natural support to enable the non-uniform weight quan-tization schemes proposed in Section 5.

We are actively working on getting even more resistancestates and investigating the precise physical mechanism ofour device-level solution. It is important to note that thepurpose of our device work is not directly comparing thenumber of resistances in STT-MRAM with other NVMs, butan important proof-of-concept for feasible STT-MRAM-based deep learning acceleration. The showcased multipleresistance states, along with the circuit-level enhancementof combining two STT-MRAM cells (Section 6), can alreadyprovide sufficient resistance states to the architecture-levelweight quantization to achieve near-zero model accuracyloss. It is also important to note that, although the newly cre-ated resistances gather at the AP state, they can be easilyscaled by a constant scaling factor at a higher design level tofulfill the design needs of the whole system.

5 NON-UNIFORM WEIGHT QUANTIZATION

With the intermediate resistance states provided by thedevice level (Section 4), this section seeks to better utilizethem to represent the original NN model, so that the accu-racy loss of the model inference can be minimized. Differentthan a lot of prior works using uniform quantization, wepropose identifying the most important quantization pointslearned from training data in non-uniform manners.

5.1 Ineffectiveness of Existing Works

Uniform quantization schemes, including the static anddynamic approaches, have been used in state-of-the-art NNaccelerator designs. The static uniform quantization [3], [16]directly relies on the fixed-point number representation(Section 3), using fixed integer and fractional lengths for thewhole model; therefore, all synaptic weights in the NNmodel have the same data precision. The dynamic uniformquantization [9], [14] allows tuning the fractional length (fl)across different CNN layers to minimize the differencebetween the original and quantized weight values. Regard-less, these two approaches both use uniform quantizationpoints that cannot capture the highly complex nature ofmodern CNNmodels.

A few existing works also used non-uniform quantiza-tion. LogNet [28] assigns quantization points based on alogarithmic distribution: the first point is at 1=2 of the maxi-mum weight value, and each addition point is at the mid-

Fig. 7. The four resistance states obtained at the AP state using differentvoltage sweeps.

412 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 31, NO. 2, FEBRUARY 2020

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 6: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

point between zero and the previous point. SPINDLE [13]uses a very similar quantization function tanh() that alsoassigns more points towards zero. Although being non-uni-form, the log and other similar quantization schemes stillsuffer from low accuracy in quantizing CNNs due to severalreasons. First, they rely on a fixed quantization function,such as log() or tanh(), thus being unaware of the varyingweight distribution of different CNN models. In otherwords, the same set of quantization points are used inde-pendently of the application. Second, even with increaseddata precision, they simply assign additional quantizationpoints towards zero. However, as we will illustrate inSection 5.2, a quantization point that is close to zero has lim-ited impact on the model accuracy. This actually motivatesour first proposed solution: the importance function-basednon-uniform quantization scheme. More quantitative com-parisons among these existing uniform/non-uniform quan-tization schemes and our proposed solutions will be shownin Section 5.4.

5.2 Proposed Solution 1: Importance Functions

Our first proposed solution is motivated by the observationthat the uniform quantization points used by the fixed-pointnumber representation are not equally important. Intui-tively, a quantization point that is close to zero has littleimpact on the model accuracy because of its small value; aquantization point that is far from zero also shows limitedimpact since only a very small amount of weights are quan-tized to it. In other words, the most important quantizationpoints are not uniformly distributed.

To characterize the importance of quantization values, weconstruct an importance function gðxÞ � jxj, where gðxÞ is theweight distribution of the NN model (as exemplified inFig. 5), to approximate the importance of different quantiza-tion values to the model accuracy. This is shown as the bluesolid curve in Fig. 8. This bimodal function curve is in accor-dancewith our previous intuition that the quantization pointsthat are too close to or too far from zero are less important.The proposed importance function takes into account boththeweight value and theweight amount of themodel, indicat-ing that the most important quantization points are aroundthe peaks of the importance function curve.

To identify the most important quantization points, weevenly partition the area between the function curve andthe x-axis into 2bw þ 1 regions. As exemplified in Fig. 8, for abit width of 3, the entire area is partitioned into 9 regions.For the central region, its quantization point is forced to bezero; for each of the other regions, the quantization point isthe x-axis value that divides the region into halves

(analogous to the center of mass for this region). We set aquantization point at zero because: (1). a great amount ofweights are close to zero, and quantizing them to otherpoints will result in too high residuals; (2). quantizing atzero can enable future optimizations that make use of themodel sparsity; and (3). extreme quantization such as ter-nary networks [29], also keeps zero as a critical point.

Furthermore, we generalize the importance function togðxÞ � jxjk, so that the weight value can be prioritized differ-ently by adjusting k. Fig. 9 illustrates the function curves forthe cases of k ¼ 1, k < 1, and k > 1. In our model, we testdifferent values of k in the range of [0, 2] with a stride of 0.1,and pick the one that gives the highest model accuracy.

5.3 Proposed Solution 2: K-Mean Clustering

Essentially, the quantization process is one dimensional(1D) clustering of synaptic weights. There exist many algo-rithms that can perform clustering, such as: k-mean [30],Jenks Natural Breaks optimization [31], kernel density esti-mation [32], and the Expectation-Maximization (EM) algo-rithm [33]. Among them, k-mean is very commonly used.The d-dimensional k-mean clustering of n points is NP-hard for d >¼ 2; however, for the 1D case there exists apolynomial time algorithm [34] that relies on dynamic pro-gramming to obtain optimal k-mean clustering in onedimension. In this subsection, we propose a k-mean-based1D clustering scheme that is similar to the optimal algo-rithm but easier to implement.

As demonstrated in Fig. 10, our proposed 1D k-meanclustering scheme is an iterative process with the followingsteps:

� Step 1: initially, a number of quantization points(green triangles) are initialized to be uniformly

Fig. 8. An illustration of non-uniform quantization.

Fig. 9. Varying the importance function by adjusting k.

Fig. 10. The process of 1D k-mean clustering.

YAN ET AL.: ICELIA: A FULL-STACK FRAMEWORK FOR STT-MRAM-BASED DEEP LEARNING ACCELERATION 413

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 7: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

distributed between the minimum and maximum ofall synaptic weights (blue circles). This uniformlinear initialization has been shown to be better thanrandom and density-based initializations [35].

� Step 2: all synaptic weights are clustered (quantized)to their closest quantization points; as a result, clus-tering of synaptic weights is established (boundariesshown as red bars).

� Step 3: in each cluster, the centroid is calculated asthe average of all the synaptic weights in this cluster;these centroids (white triangles) are then made asthe new quantization points (green triangles).

� Step 4: continuously repeat Step 2 and Step 3 torecluster synaptic weights and recalculate quantiza-tion points.

The above optimization process iteratively minimizes theaccumulated distances (i.e., the mean squared errors or dis-tortion) between the original and quantized synapticweights, and will continue until the distortion is below athreshold or the relative change in the distortion betweentwo iterations is below a threshold. Since the distortionkeeps decreasing across iterations, the whole k-mean pro-cess will converge at the end with increasingly slighterchanges in the quantization points. After the algorithm ter-minates, the finally determined quantization points, whichare non-uniform, are used to quantize the original synapticweights of the model.

Our k-mean-based clustering scheme is similar to thequantization stage in Deep Compression [35]. However,Deep Compression requires additional, expensive modelretraining after k-mean quantization to maintain modelaccuracy, whereas our scheme can achieve acceptableaccuracy loss after quantization without the need ofretraining the model, thus saving a lot of time and costs.Additionally, Deep Compression relies on a lookup table(i.e., the codebook) to enable quantization via storing theindices rather than the quantized weight values in thememory; in contrast, the PIM nature of our frameworkavoids using such a structure since the non-uniformlyquantized weight values are programmed in NVM devi-ces directly (Section 4).

5.4 Accuracy Experiments

We have implemented the proposed non-uniform quanti-zation schemes, and compared them against a number ofexisting schemes using six large CNN models fromCaffe [36]. Detailed experimental setup and benchmarkdescriptions can be found in Section 7.5. Fig. 11 showshow the model inference accuracy varies with thereduced bit width of synaptic weights in various quanti-zation schemes: “static” and “dynamic” are the static [3],[16] and dynamic [9], [14] approaches using uniformquantization; “log” is the log quantization scheme [28];“k ¼ 1” and “optimal k” are our proposed importancefunction-based non-uniform quantization (Section 5.2);and “k-mean” is our proposed k-mean-based clusteringscheme (Section 5.3). The sign bit is excluded from thebit width shown on the x-axis, because separate crossbararrays will be used for storing positive and negativeweights in our design (see Section 7.4); in other words,

the amount of crossbar arrays used for NN computation isdoubled so that the sign bit can be saved in the weight repre-sentation. In all these results, the input data is uniformlyquantized to 5 bits, because: (1). our digital-to-analog con-verter specified in Section 7.3 requires uniformly quantizingthe input neurons; and (2). reducing the bit width of inputdata to fewer than 5 bits results in unacceptable accuracyloss.

As can be seen, the static and dynamic uniform quanti-zation schemes demonstrate significant accuracy loss start-ing from 7 bits. The log quantization shows little accuracyvariation from 7 bits to 3 bits. This is expected since whenmore quantization points are available it simply assignsthem towards zero, which does not really improve modelaccuracy. Nevertheless, the log quantization still shows sig-nificant accuracy loss in several workloads includingCIFAR10, AlexNet, and CaffeNet. LeNet is a relativelysmall network where all evaluated schemes perform well.Finally, our proposed importance function-based schemewith the optimal k demonstrates negligible accuracy lossfor a bit width of as low as 4 bits, consistently in all theevaluated workloads; the proposed k-mean clusteringscheme performs even better, achieving negligible accuracyloss with a bit width of only 3 bits. Different from otherprior schemes, both of our proposed schemes learn fromdata to generate non-uniform quantization points, thus bet-ter representing the original model. The k-mean clusteringscheme iteratively fine tunes the quantization points basedon data, so it needs only a half number of quantizationpoints (8 versus 16) as the importance function-basedscheme to achieve the same (or better) model accuracy;however, the iterative nature of it also requires a muchlonger running time (more iterations) to converge.

Fig. 11. The CNN model accuracy varies with the bit width of synapticweights.

414 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 31, NO. 2, FEBRUARY 2020

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 8: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

6 CIRCUIT-LEVEL ENHANCEMENTS

Our accuracy experiments in Section 5.4 reveal that theproposed non-uniform quantization schemes can achievenear-zero accuracy loss in state-of-the-art CNN modelsas long as the bit width of synaptic weights is at least 4or 3 bits when using the importance function-basedquantization or the k-mean clustering, respectively. Thisindicates the need of 16 or 8 resistance states in a singlecell for these two schemes, respectively. However, thedevice-level work (Section 4) can only provide four resis-tance states in a STT-MRAM cell at this point. In orderto bridge the gap between the device and architecturedesigns, we further propose circuit-level enhancementsthat connect two STT-MRAM cells in parallel to store asynaptic weight.

To generate 16 resistance states for the importance func-tion-based quantization, our original design in CELIA [12]connects two STT-MRAM cells in parallel, as depicted inFig. 12 where the two STT-MRAM cells in connection haveresistances of R1 and R2, respectively. Therefore, the overallresistance (when the switch is closed) is ðR1 �R2Þ=ðR1 þR2Þ. If R1 is configured to have four non-uniformresistance states and R2 is configured to have a different setof four non-uniform resistance states, the overall resistancewill have 16 values that are non-uniform as well and canrepresent the needed 16 quantization points.

With this design, however, finding the four values ofeach of R1 and R2 is difficult (if not impossible). This isbecause only the overall resistance values are known (deter-mined by the quantization points), and configuring R1 andR2 (each with four resistance states) is equivalent to solving8 variables from 16 equations with the same form as above.To our knowledge, this set of equations may not be mathe-matically solvable.

In contrast, the k-mean clustering scheme only needs 8quantization points, which can enable more practicaldesigns for representing synaptic weights. Hence, we pro-pose a new way of connecting two STT-MRAM cells torepresent a synaptic weight, as demonstrated in Fig. 13. Inthis figure, only one of the two switches will be closed atany point of time. As a result, the overall resistance will bejust R1 or R2, and the 8 quantization points can be pro-grammed directly to the four resistances of each of the twocells. Consequently, the k-mean clustering quantizationenables a more feasible design with two STT-MRAM cellsrepresenting a synaptic weight, as it avoids the complex

mathematical process of calculating the resistances of thetwo cells needed by the importance-based quantization.

Both designs require two types of STT-MRAM cells withtwo different sets of four non-uniform resistance states. Fig. 7in Section 4.2 has already showcased one such example.Obtaining another cell type with four different resistances isfeasible using our device-level solution that adjusts the sweepbias voltage. The challenge however resided in adding moreresistance states in a single cell. Our proposed designs alsoenable easy reconfiguration of synaptic weights. To configureR1 andR2 in Fig. 12, the switch is closed first andR1 is config-ured in both cells; after that, the switch is open and R2 is con-figured in the cell on the right. In Fig. 13, either S1 or S2 isclosed to configureR1 orR2, respectively. Configuring a resis-tance state in a STT-MRAM cell can be done via performinga voltage sweep with certain conditions, as described inSection 4.

Prior studies also composed multiple NVM cells to repre-sent a synaptic weight. For example, PRIME [9] used two 4-bitRRAM cells to represent one 8-bit synaptic weight. However,PRIME’s composing scheme is in the digital domain, requir-ing costly digital circuits; in contrast, our two-cell design relieson analog currents being composed for computation, andtherefore only needs one half of analog-to-digital converters(ADCs) and much simplified inter-cell circuits comparedto PRIME. Besides, PRIME’s composing scheme only worksfor uniform quantization, whereas our design enables non-uniform quantization by configuring non-uniform resistancestates directly inNVMcells.

7 A DEEP LEARNING ACCELERATOR SYSTEM

In addition to the device/architecture/circuit innovations,we also include a detailed accelerator system design in iCE-LIA to achieve a full-stack framework for STT-MRAM-based deep learning acceleration. As shown in Fig. 14a, theaccelerator system is composed of a number of computeunits that are interconnected. A compute unit (CU) has apipelined architecture given in Fig. 14b. For comparisonpurposes, we configure our system architecture similar torecent RRAM accelerators PRIME [9] and PipeLayer [11],which organize computational crossbar arrays in a hierar-chy of banks/chips/ranks similar to DRAM. This sectionwill use PipeLayer as the baseline, and introduce severalenhancements.

In the proposed system, original input images are firstfetched from off-chip memory, quantized uniformly to a bit

Fig. 12. Storing a synaptic weight for importance function-basedquantization.

Fig. 13. Storing a synaptic weight for k-mean clustering quantization.

YAN ET AL.: ICELIA: A FULL-STACK FRAMEWORK FOR STT-MRAM-BASED DEEP LEARNING ACCELERATION 415

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 9: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

width of 5 bits (see Section 5.4), and stored in on-chip buffersfor future reuse of intermediate results. Before input dataenter the CU pipeline, synaptic weights have already beenprogrammed into crossbar arrays using our proposed non-uniform quantization with a largely reduced bit width(Sections 5). The entire CU pipeline is in the analog domainwith digital-to-analog converters and analog-to-digital con-verters as the entry and exit points, respectively. The detaileddesigns of different pipeline stages will be described in thefollowing subsections. The buffers are logically shared acrossCUs, but can be physically distributed to each CU in a realsystem. The CUs are allocated to different layers in a CNNmodel based on the computation need of each layer and thetotal available CUs in the system.

7.1 Crossbar Array Allocation with Partial InputReuse

We first illustrate how a convolution operation is performedin a crossbar array, and define the concept of weight matrix.Background on convolution can be referred to in Section2.1. Fig. 15 (a) illustrates such a convolution operation: win-dows of data, each being from an input feature map, areflattened and concatenated to form an input vector; thesame number of convolution kernels, as colored in Fig. 15a,are also flattened and concatenated to form a weight vector;calculating the dot-product of these two vectors gives onepixel value in an output feature map. In a crossbar array, asshown in Fig. 15b, the input vector is applied horizontallyas wordline voltages; the weight vector is programmed toone vertical bitline of cells (colored as well to match the cor-responding kernels in (a)); and the resulting current flowing

down the bitline gives the output pixel value. To calculatethe pixels at the same location of the other output featuremaps, the same input vector is convolved with other weightvectors formed by different sets of kernels. All such weightvectors, each of which still occupies a vertical bitline, form aweight matrix (WM) in the crossbar array (Fig. 15b).

The weight matrix of a layer contains all the synapticweights of the layer. As shown in Fig. 15b, it has a size ofnin � k� k� nout, where nin and nout are the numbers ofinput/output feature maps of the current layer, and k� k isthe kernel size. Therefore, a layer closer to the output of theCNN model typically has a larger weight matrix. When theinput data windows slide to the next location, a new inputvector is formed and applied to the weight matrix to calcu-late the next set of output pixels. Consequently, a NVMaccelerator can choose to apply input vectors sequentially tothe same weight matrix, or replicate multiple copies of theweight matrix to improve data processing parallelism [11].On the other hand, to accommodate a large weight matrix,we simply need to compose multiple crossbar arrays in the2D space. In particular, peripheral circuits need to be addedto merge the analog current from one crossbar array with theone from another. This effectively extends the dot-productoperation beyond the crossbar array boundary.

A naive crossbar array allocation scheme, as shown inFig. 16b, simply replicates weight matrices without anyoverlaps in either of the horizontal and vertical directions.This non-overlapping is to avoid interference in both inputsand outputs of the crossbar array. In Fig. 16, we assumenin ¼ 1, nout ¼ 5, and k ¼ 3, and the resulting weight matrixis 9� 5. As shown in Fig. 16b, a 30� 30 crossbar array canonly accommodate three such weight matrices, which result

Fig. 14. (a): A logical overview of the proposed accelerator system. (b):The design of a compute unit (CU).

Fig. 15. (a): A convolution example. (b): The corresponding weight matrix.

Fig. 16. (a): Sliding windows of input data used in convolution. (b): Naive crossbar array allocation. (c): Crossbar array allocation with partial inputreuse.

416 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 31, NO. 2, FEBRUARY 2020

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 10: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

in only half of the wordlines generating effective outputs.Fig. 16a shows the corresponding sliding windows of inputdata (with pixels numbered from 1 to 15) for the threeweight matrices. Since a convolution operation usuallyslides input windows with a stride of 1, we can observe sig-nificant overlapped pixels in nearby input windows.

Consequently, we propose a new crossbar array alloca-tion scheme that takes into account partial input reuse. Asillustrated in Fig. 16c, the three replicated weight matricesreuse the input data that they share (with input pixel num-bers shown). As a result, another three weight matrices canbe accommodated in the crossbar array, and all the word-lines now have effective outputs. The proposed allocationscheme effectively doubles the data processing parallelismin this example.

7.2 Crossbar Array Allocation with Optimal InputReuse

The crossbar array allocation scheme proposed in Section7.1 reuses the shared input pixels between adjacent slidingdata windows. However, it suffers from two issues. First,only a portion of the input pixels can be reused, and theeffectiveness of the scheme depends on the stride of the slid-ing input window. If the stride is larger than 1, the schemewill be less effective. Second, when the input windowreaches the end of one row and slides to the next row, nopixels can be reused (e.g., WM3 and WM4 in Fig. 16c). Inthis subsection, we further propose a crossbar array alloca-tion scheme that reuses input pixels in an optimalway.

In Fig. 17, we illustrate the optimal input reuse schemeusing an example with 3� 3 input feature map (Pixel 1 to 9)and 2� 2 sliding window. Fig. 17b shows the allocationscheme with partial input reuse, where no input pixels canbe reused when the window slides to a different row (i.e.,between the green and blue input vectors). In contrast, ourproposed optimal input reuse scheme (Fig. 17c) lists allinput pixels in a single global order, e.g., Pixel 1 to 9. For aparticular weight matrix, it will only enable the rows corre-sponding to its input pixels. As a consequence, input pixelsare better reused across not just adjacent but also all datawindows. For the example in Fig. 17, allocation with opti-mal input reuse reduces the needed number of crossbararray rows from 12 (for partial input reuse) to 9, resulting in

a 25 percent improvement. It is important to note that theproposed scheme is optimal, because every input pixel occu-pies one (and only one) row in the crossbar array.

7.3 An Energy Efficient DAC Design

Digital-to-analog converters are responsible for transform-ing the digital data fetched from buffers into analog inputvoltages to the crossbar array. Similar to ISAAC [10], wepropose a DAC design taking one bit of information at atime. This is illustrated in Fig. 18, where inputs are repre-sented as 5-bit binaries. In each cycle, only one bit column(with each bit from one input) is converted by the DAC toanalog voltages. A shift-and-add logic (described in Section7.4) will aggregate multiple bit columns in the analogdomain. This binary streaming approach only needs a sim-ple inverter to generate high and low voltages (representingthe “1” and the “0”), thus largely reducing design complex-ity and energy consumption of the DAC.

In addition, we incorporate a bit flipping scheme in theDAC: in a column of input bits, the DAC flips all the bits ifthere are more 1s than 0s (assuming that the high voltage isused to represent “1”). This scheme further reduces theenergy consumption of the DAC at the expense of one extrabit per input bit column to indicate flipping.

7.4 Other Components

[Accumulation Logic]. The accumulation logic is responsiblefor the following tasks. First, it uses an amplifier to imple-ment an I-to-V logic to generate the result voltage based onthe result current. In this process, it checks whether theinput bits have been flipped in the DAC, and outputs thecorrect result voltages accordingly. Second, it accumulatesthe result voltages from multiple input bit columns, andoutputs the results for the complete inputs. An circuitimplementation of these two tasks is given in Fig. 19. Theshift-and-add logic is needed to assemble the outputs dueto the DAC design (Fig. 18) taking each input bit columnseparately. Third, the accumulation logic handles the signedarithmetic, by using separate crossbar arrays for positiveand negative synaptic weights [9]. As shown in Fig. 20, itrelies on a subtraction circuit to calculate the differencebetween the result voltages from the two crossbar arrays.Finally, it performs ReLU activation (y ¼ maxð0; xÞ), by out-putting a zero voltage for a negative result and keeping theoriginal value for a positive result.

[Pooling]. To perform max pooling, we follow the samedesign proposed in PRIME [9]. As shown in Fig. 21, to select

Fig. 17. (a): Sliding windows of input data used in convolution. (b): Allo-cation with partial input reuse. (c): Allocation with optimal input reuse.

Fig. 18. The proposed DAC design.

YAN ET AL.: ICELIA: A FULL-STACK FRAMEWORK FOR STT-MRAM-BASED DEEP LEARNING ACCELERATION 417

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 11: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

the maximum among A, B, C, and D, the proposed logic cal-culates the difference between each pair of inputs and usesthe results (either positive or negative for each difference)as the selector signals to the multiplexor to select the maxi-mum. Similar to the accumulation logic handling signedarithmetic, separate crossbar arrays are used to store thepositive and negative inputs in calculating the differencebetween a pair of inputs.

[ADC]. Similar to PipeLayer [11], we propose an inte-grate-and-fire circuit as our analog-to-digital converter. Asdepicted in Fig. 22, the input current to be measured firstenters a capacitor whose voltage will therefore increase.When the voltage of the capacitor reaches a threshold, apulse will be generated to close the switch, in which casethe capacitor will release all its charge. After that, the switchwill be opened again, and the capacitor will continue tointegrate voltage from the input current. Based on the gen-erated pulse frequency, the digital value of the input currentcan be calculated. It is important to note that the ADC in ouraccelerator system is the exit point of the compute unit pipe-line (Fig. 14b). Hence, all the operations occurring in thecrossbar array, accumulation logic, and pooling logic are inthe analog domain. This reduces the amount and complex-ity of the ADCs needed in the system.

[Buffers]. To have only one type of NVM in the system,the on-chip buffers are also implemented with STT-MRAM.STT-MRAM has long been used in implementing low-levelcaches [37] and main memory [38], [39]. In particular, arecent study [40] specifically utilizes STT-MRAM as a suit-able storage device for energy-efficient neural networkaccelerators. Furthermore, we observe that the data usage inthese buffers exhibits low locality with short data reuse

duration (i.e., new data written to the buffer will be readonly once). This is due to the fact that the outputs generatedby one layer in a CNNmodel will only be used as the inputsto the next layer. Therefore, we can reduce the data reten-tion time of the STT-MRAM buffer in exchange of improvedenergy efficiency [39], [41], [42], [43]. We will leave thisenhancement as our future work.

7.5 System-Level Experiments

[Experimental Setup]. In our system-level experiments, weevaluate the performance and energy consumption of iCE-LIA, and compare it against PipeLayer [11], a recent RRAM-based deep learning accelerator. Six workloads fromCaffe [36] are used in our experiments: LeNet, CIFAR-10,AlexNet, CaffeNet, VGG16, and VGG19. The first two weretrained in-house, while the rest were pre-trained modelsdownloaded from Caffe Model Zoo [44]. Table 1 lists thenumbers of layers in each workload (note that VGG16 andVGG19 only count CONV and FC layers in their names).

To evaluate performance, we develop an in-house simu-lator based upon DRAMSim2 [45] and NVSim [46]. On topof the state-of-the-art baseline, our performance simulatorparticularly simulates the improved parallelism due to theproposed crossbar array allocations with partial/optimalinput reuse and other benefits due to various enhance-ments, such as more advanced quantization reducing NVMcells to represent a synaptic weight. For a fair comparisonwith PipeLayer, we assume that both systems have thesame amount of NVM cells. To evaluate energy consump-tion, we also develop our own energy model utilizing unitenergy data from ISAAC [10], PipeLayer [11], and NVSim.We will report the energy consumption of various compo-nents in iCELIA, including crossbar arrays, DACs, ADCs,buffers,etc.

[Performance]. Fig 23 shows the performance comparisonbetween PipeLayer and iCELIA (using crossbar arrayallocation with optimal input reuse). Speedups over Pipe-Layer (higher is better) are shown. iCELIA consistently

Fig. 19. The shift-and-add logic.

Fig. 20. Signed arithmetic and ReLU activation.

Fig. 21. The pooling logic.

Fig. 22. The integrate-and-fire ADC.

418 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 31, NO. 2, FEBRUARY 2020

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 12: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

outperforms PipeLayer in all workloads evaluated, achiev-ing an overall speedup of 3:3� than PipeLayer. Performanceis improved primarily due to two reasons. First, our pro-posed crossbar array allocation scheme (Section 7.2) moreefficiently utilizes the available crossbar arrays, especiallyin CONV layers with relatively small weight matrices (e.g.,in CIFAR-10). This is shown as the second bar in Fig. 23,which varies across benchmarks with an average speedupof 1:65�. Second, PipeLayer needs four 4-bit RRAM cells torepresent a 16-bit synaptic weight, whereas iCELIA onlyneeds two STT-MRAM cells to represent a weight (Section 6)due to the proposed quantization schemes. As a conse-quence, the effective computation capacity is doubled iniCELIA, resulting in a consistent speedup of 2 (the third barin Fig. 23).

Furthermore, we quantitatively analyze the effectivenessof the two proposed crossbar array allocation schemes.Fig. 24 lists the sensitivity of the speedup (due to crossbararray allocation with partial input reuse) of iCELIA overPipeLayer on different crossbar array sizes, with a fixedtotal amount of crossbar arrays. As can be seen, the speedupincreases with a larger crossbar array size. This is because alarger crossbar array generally provides better input reuse(more overlapping) for crossbar array allocation. Thedefault crossbar array size is 256� 256 in both PipeLayerand iCELIA. To compare the two input reusing schemes,Fig. 25 gives the speedup of the optimal input reuse schemeover the partial input reuse scheme. As can be seen, higherspeedups can be achieved with larger crossbar arrays (e.g.,256� 256 or bigger) or smaller weight matrices (e.g., inLeNet and CIFAR-10). This is in accordance with thespeedup trends discovered in Fig. 24. Overall, crossbararray allocation with partial input reuse already workspretty well, but the optimal scheme indeed results in anadditional 7 percent performance improvement, especiallywhen using large crossbar arrays.

[Energy Consumption]. Fig. 26 compares the energyconsumption of PipeLayer and iCELIA, showing a break-down by different components. Overall, iCELIA’s energy

consumption is only 16 percent of that of PipeLayer, achiev-ing an energy efficiency improvement of 6:25�. As can beseen, the major reductions are in DACs, crossbar arrays,ADCs, and buffers. The energy reduction in DACs is due to:(1). our DACs having only two voltages (much reducedpower); (2). the proposed bit flipping scheme; and (3). theimproved performance (reduced running time). The energyreduction in crossbar arrays is due to the fact that STT-MRAM cells have much lower resistances than RRAM cells.The energy reduction in ADCs is because: (1). iCELIA needsonly one half of ADCs than PipeLayer (since iCELIA com-poses two cells in analog domain); and (2). the performanceis improved. The energy reduction in buffers is becausePipeLayer stores 16 bits for each input neuron whereas iCE-LIA only uses 5 bits.

8 RELATED WORK

Most of the related works have already been discussedthroughout the previous sections. Sections 2.2 and 3 out-lined recent NVM (particularly RRAM)-based deep learn-ing accelerators, including SPINDLE [13], PRIME [9],ISAAC [10], and PipeLayer [11]; Section 7.5 provided quan-titative comparisons between our work and the most recentdesign PipeLayer. Section 5.1 and Section 5.3 compared ourproposed quantization schemes with existing uniformquantization (static [3], [16] and dynamic [9], [14]) and non-uniform quantization (LogNet [28] and Deep Compres-sion [35]); Section 5.4 demonstrated the effectiveness of ourquantization in model accuracy against some of these exist-ing schemes. Section 6 qualitatively compared our analogcell composing scheme with the digital cell composingscheme in PRIME [9].

Apart from these, Chung et al. [47] proposed a domainwall memory-based CNN computation system that can pro-vide increased bit width for stored synaptic weights; Fan

TABLE 1Numbers of Layers in the Evaluated CNN Models

CNNModel CONV Pooling FC Total

LeNet 2 2 2 6CIFAR-10 3 3 1 7AlexNet 5 3 3 11CaffeNet 5 3 3 11VGG16 13 5 3 21VGG19 16 5 3 24

Fig. 23. Performance (speedup) comparison.

Fig. 24. Sensitivity of speedup (due to crossbar array allocation with par-tial input reuse) on crossbar array sizes.

Fig. 25. Speedup of optimal input reuse over partial input reuse on cross-bar array sizes.

YAN ET AL.: ICELIA: A FULL-STACK FRAMEWORK FOR STT-MRAM-BASED DEEP LEARNING ACCELERATION 419

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 13: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

et al. [48] investigated using dual-mode SOT-MRAM toimplement a reconfigurable in-memory logic for binaryNNs. These works merely focused on circuit-level designs,while our work iCELIA is a full-stack framework spanningmultiple design levels. More importantly, iCELIA enablesthe first STT-MRAM-based deep learning accelerator.

AC-DIMM [49] integrates a set of programmable micro-controllers in TCAM to conduct in-memory associativesearch. The largest benefit of iCELIA over AC-DIMM is thatwe specifically target deep learning applications. Our workperforms in-situ analog computing in STT-MRAM crossbararrays, achieving massive parallelism for matrix multiplica-tions, whereas AC-DIMM only uses STT-MRAM for datastorage and uses digital components for in-memory compu-tation. Moreover, iCELIA provides a full-stack solutionacross device, architecture, circuit, and system levels.

Compute Caches [50] enable in-place computation inSRAM caches. STT-MRAM was initially used to replace low-level caches when it was first implemented. However, wefocus on replacing DRAM and conducting in-main memoryacceleration because of two reasons: (1) there is a recent trendof using STT-MRAM in main memory [38]; and (2) due to the“memory wall,” performing computation in main memoryresults in higher benefits than in-SRAMcomputing.

9 CONCLUSIONS

This paper proposes: (1). a device-level solution for STT-MRAM to generate intermediate resistances in each cell; (2).two non-uniform data quantization schemes to minimizethe model accuracy loss due to reduced data precision; (3).circuit-level enhancements to bridge the gap betweendevice and architecture solutions; and (4). a comprehensivedeep learning accelerator with detailed component designs.The proposed framework is the first full-fledged deep learn-ing accelerator using STT-MRAM crossbar arrays, exhibit-ing a full-stack solution that applies the STT-MRAMtechnology as both a promising synaptic element and amagnetic neuromorphic computer.

ACKNOWLEDGMENTS

This work is supported in part by National Science Founda-tion (NSF) under Grant CCF-1566158, the University ofTexas System Faculty Science and Technology Acquisitionand Retention (STARs) fund, and the GREAT seed grantfrom UTSA Office of Vice President for Research, EconomicDevelopment and Knowledge Enterprise.

REFERENCES

[1] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma,Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, A. C. Berg, andL. Fei-Fei, “Imagenet large scale visual recognition challenge,” Int.J. Comput. Vis., vol. 115, no. 3, pp. 211–252, Dec. 2015.

[2] V. Sze, Y. H. Chen, T. J. Yang, and J. S. Emer, “Efficient processingof deep neural networks: A tutorial and survey,” Proc. IEEE,vol. 105, no. 12, pp. 2295–2329, Dec. 2017.

[3] Y. Chen, T. Luo, S. Liu, S. Zhang, L. He, J. Wang, L. Li, T. Chen,Z. Xu, N. Sun, and O. Temam, “Dadiannao: A machine-learningsupercomputer,” in Proc. Int. Symp. Microarchitecture, 2014,pp. 609–622.

[4] D. Lee, Y. Kim, V. Seshadri, J. Liu, L. Subramanian, and O. Mutlu,“Tiered-latency dram: A low latency and low cost dramarchitecture,” in Proc. Int. Symp. High Perform. Comput. Archit.,2013, pp. 615–626.

[5] U. Kang, H. soo Yu, C. Park, H. Zheng, J. Halbert, K. Bains,S. Jang, and J. S. Choi, “Co-architecting controllers and dram toenhance dram process scaling,” in The Memory Forum, 2014.

[6] B. C. Lee, E. Ipek, O. Mutlu, and D. Burger, “Architecting phasechange memory as a scalable dram alternative,” in Proc. 36thAnnu. Int. Symp. Comput. Architect., 2009, pp. 2–13.

[7] Y. Huai, “Spin-transfer torque mram (stt-mram): Challenges andprospects,” AAPPS Bull., vol. 18, no. 6, 2008.

[8] H. S. P. Wong, H. Y. Lee, S. Yu, Y. S. Chen, Y. Wu, P. S. Chen,B. Lee, F. T. Chen, and M. J. Tsai, “Metal-oxide rram,” Proc. IEEE,vol. 100, no. 6, pp. 1951–1970, Jun. 2012.

[9] P. Chi, S. Li, C. Xu, T. Zhang, J. Zhao, Y. Liu, Y. Wang, and Y. Xie,“Prime: A novel processing-in-memory architecture for neuralnetwork computation in reram-based main memory,” in Proc. Int.Symp. Comput. Archit., 2016, pp. 27–39.

[10] A. Shafiee, A. Nag, N. Muralimanohar, R. Balasubramonian,J. P. Strachan, M. Hu, R. S. Williams, and V. Srikumar, “ISAAC:A convolutional neural network accelerator with in-situ analogarithmetic in crossbars,” in Proc. Int. Symp. Comput. Archit., 2016,pp. 14–26.

[11] L. Song, X. Qian, H. Li, and Y. Chen, “Pipelayer: A pipelinedreram-based accelerator for deep learning,” in Proc. Int. Symp.High Perform. Comput. Archit., 2017, pp. 541–552.

[12] H. Yan, H. R. Cherian, E. C. Ahn, and L. Duan, “Celia: A deviceand architecture co-design framework for stt-mram-based deeplearning acceleration,” in Proc. ACM Int. Conf. Supercomputing,2018, pp. 149–159.

[13] S. G. Ramasubramanian, R. Venkatesan, M. Sharad, K. Roy, andA. Raghunathan, “Spindle: Spintronic deep learning engine forlarge-scale neuromorphic computing,” in Proc. Int. Symp. LowPower Electron. Des., 2014, pp. 15–20.

[14] J. Qiu, J. Wang, S. Yao, K. Guo, B. Li, E. Zhou, J. Yu, T. Tang,N. Xu, S. Song, Y. Wang, and H. Yang, “Going deeper withembedded fpga platform for convolutional neural network,” inProc. ACM/SIGDA Int. Symp. Field-Programmable Gate Arrays, 2016,pp. 26–35.

[15] M. Song, Y. Hu, H. Chen, and T. Li, “Towards pervasive and usersatisfactory cnn across gpu microarchitectures,” in Proc. Int. Symp.High Perform. Comput. Archit., 2017, pp. 1–12.

[16] T. Chen, Z. Du, N. Sun, J. Wang, C. Wu, Y. Chen, and O. Temam,“Diannao: A small-footprint high-throughput accelerator for ubiq-uitous machine-learning,” in Proc. Int. Conf. Architectural SupportProgram. Lang. Operating Syst., 2014, pp. 269–284.

[17] Y. H. Chen, J. Emer, and V. Sze, “Eyeriss: A spatial architecture forenergy-efficient dataflow for convolutional neural networks,” inProc. 43rd Int. Symp. Comput. Archit., 2016, pp. 367–379.

[18] N. P. Jouppi, C. Young, N. Patil, D. Patterson, G. Agrawal, R. Bajwa,S. Bates, S. Bhatia, N. Boden, A. Borchers, R. Boyle, P.-l. Cantin,C. Chao, C. Clark, J. Coriell, M. Daley, M. Dau, J. Dean, B. Gelb,T. V. Ghaemmaghami, R. Gottipati, W. Gulland, R. Hagmann,C. R. Ho, D. Hogberg, J. Hu, R. Hundt, D. Hurt, J. Ibarz, A. Jaffey,A. Jaworski, A. Kaplan, H. Khaitan, D. Killebrew, A. Koch,N. Kumar, S. Lacy, J. Laudon, J. Law, D. Le, C. Leary, Z. Liu,K. Lucke, A. Lundin, G. MacKean, A. Maggiore, M. Mahony,K. Miller, R. Nagarajan, R. Narayanaswami, R. Ni, K. Nix, T. Norrie,M. Omernick, N. Penukonda, A. Phelps, J. Ross, M. Ross, A. Salek,E. Samadiani, C. Severn, G. Sizikov, M. Snelham, J. Souter, D. Stein-berg, A. Swing, M. Tan, G. Thorson, B. Tian, H. Toma, E. Tuttle,V. Vasudevan, R. Walter, W. Wang, E. Wilcox, and D. H. Yoon,“In-datacenter performance analysis of a tensor processing unit,” inProc. 44th Annu. Int. Symp. Comput. Archit., 2017, pp. 1–12.

Fig. 26. The comparison of energy consumption and its breakdown bycomponents.

420 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 31, NO. 2, FEBRUARY 2020

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 14: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

[19] M. J. Kang, T. J. Park, Y. W. Kwon, D. H. Ahn, Y. S. Kang,H. Jeong, S. J. Ahn, Y. J. Song, B. C. Kim, S. W. Nam, H. K. Kang,G. T. Jeong, and C. H. Chung, “Pram cell technology and charac-terization in 20nm node size,” in Proc. Int. Electron Dev. Meet.,2011, pp. 3.1.1–3.1.4.

[20] C. W. Hsu, I. T. Wang, C. L. Lo, M. C. Chiang, W. Y. Jang, C. H. Lin,and T. H. Hou, “Self-rectifying bipolar taox/tio2 rramwith superiorendurance over 1012 cycles for 3d high-density storage-class memo-ry,” in Proc. Symp. VLSI Technol., 2013, pp. T166–T167.

[21] J. J. Kan, C. Park, C. Ching, J. Ahn, L. Xue, R. Wang, A. Kontos,S. Liang, M. Bangar, H. Chen, S. Hassan, S. Kim, M. Pakala, andS. H. Kang, “Systematic validation of 2x nm diameter perpendicu-lar mtj arrays and mgo barrier for sub-10 nm embedded stt-mramwith practically unlimited endurance,” in Proc. IEEE Int. ElectronDev. Meet., 2016, pp. 27.4.1–27.4.4.

[22] J. Grollier, D. Querlioz, andM. D. Stiles, “Spintronic nanodevices forbioinspired computing,” Proc. IEEE, vol. 104, no. 10, pp. 2024–2039,Oct. 2016.

[23] C. D. Schuman, T. E. Potok, R. M. Patton, J. D. Birdwell, M. E. Dean,G. S. Rose, and J. S. Plank, “A survey of neuromorphic computingand neural networks in hardware,”CoRR, vol. abs/1705.06963, 2017.[Online]. Available: http://arxiv.org/abs/1705.06963

[24] G. Hilson, “Everspin aims mram at ssd storage tiers,” in Proc.EETimes, Apr. 2016. [Online]. Available: https://www.eetimes.com/document.asp?doc_id=1329477#

[25] S. Ikeda, J. Hayakawa, Y. Ashizawa, Y. M. Lee, K. Miura,H. Hasegawa, M. Tsunoda, F. Matsukura, and H. Ohno, “Tunnelmagnetoresistance of 604% at 300k by suppression of ta diffusionin CoFeB/MgO/CoFeB pseudo-spin-valves annealed at hightemperature,” Appl. Phys. Lett., vol. 93, no. 8, 2008. doi: 10.1063/1.2976435.

[26] “Fixed-point arithmetic.” [Online]. Available: https://en.wikipedia.org/wiki/Fixed-point_arithmetic

[27] S. Lequeux, J. Sampaio, V. Cros, K. Yakushiji, A. Fukushima,R. Matsumoto, H. Kubota, S. Yuasa, and J. Grollier, “A magneticsynapse: multilevel spin-torque memristor with perpendicularanisotropy,” Sci. Rep., vol. 6, no. 31510, Aug. 2016, Art. no. 31510.

[28] E. H. Lee, D. Miyashita, E. Chai, B. Murmann, and S. S. Wong,“Lognet: Energy-efficient neural networks using logarithmiccomputation,” in Proc. Int. Conf. Acoust. Speech Signal Process.,2017, pp. 5900–5904.

[29] F. Li and B. Liu, “Ternary weight networks,” CoRR, vol. abs/1605.04711, 2016. [Online]. Available: http://arxiv.org/abs/1605.04711

[30] S. Lloyd, “Least squares quantization in pcm,” IEEE Trans. Inf.Theory, vol. 28, no. 2, pp. 129–137, Mar. 1982.

[31] G. F. Jenks, “The data model concept in statistical mapping,” Int.Yearbook Cartography 7, pp. 186–190, 1967.

[32] M. Rosenblatt, “Remarks on some nonparametric estimates of a den-sity function,”Ann.Math. Statist., vol. 27, no. 3, pp. 832–837, 1956.

[33] “Expectation?maximization algorithm.” [Online]. Available:https://en.wikipedia.org/wiki/Expectation?maximization_algorithm

[34] H. Wang and M. Song, “Ckmeans.1d.dp: Optimal k-means clus-tering in one dimension by dynamic programming,” R J., vol. 3,no. 2, pp. 29–33, 2011.

[35] S. Han, H. Mao, and W. J. Dally, “Deep compression: Com-pressing deep neural networks with pruning, trainedquantization and huffman coding,” in Proc. Int. Conf. Learn.Representations, 2016.

[36] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick,S. Guadarrama, and T. Darrell, “Caffe: Convolutional architecturefor fast feature embedding,” in Proc. 22nd ACM Int. Conf. Multime-dia, 2014, pp. 675–678, doi: 10.1145/2647868.2654889.

[37] G. Sun, X. Dong, Y. Xie, J. Li, and Y. Chen, “A novel architecture ofthe 3d stacked mram l2 cache for cmps,” in Proc. IEEE 15th Int.Symp. High Perform. Comput. Archit., 2009, 239–249.

[38] E. Kultursay, M. Kandemir, A. Sivasubramaniam, and O. Mutlu,“Evaluating STT-RAM as an energy-efficient main memory alter-native,” in Proc. IEEE Int. Symp. Perform. Anal. Syst. Softw., 2013,pp. 256–267.

[39] H. Yan, L. Jiang, L. Duan, W.-M. Lin, and E. John, “Flowpap andflowrer: Improving energy efficiency and performance for stt-mram-based handheld devices under read disturbance,” ACMTrans. Embedded Comput. Syst. - Special Issue ESWEEK, vol. 16, no.5s, 2017, Art. no. 132.

[40] L. Song, Y. Wang, Y. Han, H. Li, Y. Cheng, and X. Li, “STT-RAMbuffer design for precision-tunable general-purpose neural net-work accelerator,” IEEE Trans. Very Large Scale Integr. Syst.,vol. 25, no. 4, pp. 1285–1296, Apr. 2017.

[41] C. W. Smullen, V. Mohan, A. Nigam, S. Gurumurthi, andM. R. Stan, “Relaxing non-volatility for fast and energy-efficientstt-ram caches,” in Proc. Int. Symp. High Perform. Comput. Archit.,2011, pp. 50–61.

[42] Z. Sun, X. Bi, H. H. Li, W.-F. Wong, Z.-L. Ong, X. Zhu, andW. Wu,“Multi retention level STT-RAM cache designs with a dynamicrefresh scheme,” in Proc. Int. Symp. Microarchitecture, 2011,pp. 329–338.

[43] A. Jog, A. Mishra, C. Xu, Y. Xie, V. Narayanan, R. Iyer, and C. Das,“Cache revive: Architecting volatile STT-RAM caches forenhanced performance in cmps,” in Proc. ACM/EDAC/IEEE Des.Autom. Conf., 2012, 243–252.

[44] “Caffe model zoo.” [Online]. Available: http://caffe.berkeleyvision.org/model_zoo.html

[45] P. Rosenfeld, E. Cooper-Balis, and B. Jacob, “Dramsim2: A cycleaccurate memory system simulator,” Comput. Archit. Lett., vol. 10,no. 1, pp. 16–19, Jan.-Jun. 2011.

[46] X. Dong, C. Xu, Y. Xie, and N. P. Jouppi, “Nvsim: A circuit-levelperformance, energy, and area model for emerging nonvolatilememory,” IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst.,vol. 31, no. 7, pp. 994–1007, Jul. 2012.

[47] J. Chung, J. Park, and S. Ghosh, “Domain wall memory based con-volutional neural networks for bit-width extendability andenergy-efficiency,” in Proc. Int. Symp. Low Power Electron. Des.,2016, pp. 332–337.

[48] D. Fan and S. Angizi, “Energy efficient in-memory binary deepneural network accelerator with dual-mode SOT-MRAM,” inProc. Int. Conf. Comput. Des., 2017, pp. 609–612.

[49] Q. Guo, X. Guo, R. Patel, E. Ipek, and E. G. Friedman, “AC-DIMM:Associative computing with stt-mram,” in Proc. Int. Symp. Comput.Archit., 2013, pp. 189–200.

[50] S. Aga, S. Jeloka, A. Subramaniyan, S. Narayanasamy, D. Blaauw,and R. Das, “Compute caches,” in Proc. Int. Symp. High Perform.Comput. Archit., 2017, pp. 481–492.

Hao Yan received bachelor’s degree from Huaz-hongUniversity of Science andTechnology, China,the master’s degree from the Institute of Microelec-tronics, Peking University, China, in 2012, and thePhD degree from the Department of Electrical andComputer Engineering, University of Texas at SanAntonio. He is currently a senior engineer withSamsung, Austin, Texas. His research interestsinclude computer architecture and memory sys-tems. He is a studentmember of the IEEE.

Hebin R. Cherian received the bachelor’s degreefrom the University of Mumbai, India in 2013, andthen worked as a power audit engineer to analyzeand optimize electrical systems for increased effi-ciency and safety. He is currently working towardthe master’s degree in the Department of Electricaland Computer Engineering, University of Texas atSan Antonio. His current research interests includeemerging non-volatilememory devices, energyhar-vesting, microfabrication, and MEMS. He receiveda bachelor’s degree from University of Mumbai,

India in 2013, and then worked as a Power Audit Engineer to analyze andoptimize electrical systems for increased efficiency and safety. He is a stu-dent member of the IEEE.

YAN ET AL.: ICELIA: A FULL-STACK FRAMEWORK FOR STT-MRAM-BASED DEEP LEARNING ACCELERATION 421

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.

Page 15: iCELIA: A Full-Stack Framework for STT-MRAM-Based Deep ...alchem.usc.edu/portal/static/download/icella.pdf · MRAM cell, thus improving the data precision of the synaptic weights

Ethan C. Ahn received the BS and MS degrees inEE from the Korea Advanced Institute of Scienceand Technology (KAIST), in 2005 and 2007,respectively and the PhD degree in EE fromStanford University, in 2015. After receiving MSdegree, he worked with the Korea Institute of Sci-ence and Technology (KIST). He is currently anassistant professor with the Department of Electri-cal and Computer Engineering, University of Texasat San Antonio. Previously, he worked as a seniorpanel process engineer with Apple, Inc. and as a

post-doctoral researcher with Stanford University. He is the author of morethan 30 peer-reviewed research journal and conference papers, one USpatent, and one book chapter in nanoelectronics. He serves as an IEEEElectron Devices Society (EDS) Technical Committee Member for Opto-electronics Devices. He is amember of the IEEE.

Xuehai Qian received the PhD degree from theComputer Science Department, University of Illi-nois at Urbana-Champaign. He is currently anassistant professor with the Ming Hsieh Depart-ment of Electrical Engineering and theDepartmentof Computer Science, University of Southern Cali-fornia. His current research interests include com-puter architecture and architectural support forprogramming productivity and correctness of par-allel programs. He is amember of the IEEE.

Lide Duan received the bachelor’s degree in com-puter science from Shanghai Jiao Tong University,China, in 2006 and the PhD degree in computerengineering from Louisiana State University, in2011. He is currently a research scientist withComputing Technology Lab, Alibaba DAMOAcad-emy, in Sunnyvale, California. Prior to joining Ali-baba in 2019, he was an assistant professor withthe Department of Electrical and Computer Engi-neering, University of Texas at San Antonio. Hisresearch is in computer architecture with a current

focus on deep learning acceleration and non-volatile memory systems.Prior to joining UTSA in 2014, he worked as a senior design engineer withAMD on future x86-based high performance and low power CPU micro-architecture design and performance modeling. In addition, he had aninternship in Lawrence Livermore National Laboratory in Summer 2011.He is amember of the IEEE.

" For more information on this or any other computing topic,please visit our Digital Library at www.computer.org/csdl.

422 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 31, NO. 2, FEBRUARY 2020

Authorized licensed use limited to: University of Southern California. Downloaded on March 01,2020 at 19:23:29 UTC from IEEE Xplore. Restrictions apply.


Recommended