scieee AI-readable full text Open interactive document viewer

Initial results on fuzzy floating point computation for multimedia processors

Álvarez Martínez, Carlos,Corbal San Adrián, Jesús,Salamí San Juan, Esther,Valero Cortés, Mateo

Abstract

During the recent years, the market of mid/low-end portable systems such as PDAs or mobile digital phones have experimented a revolution in both selling volume and features as handheld devices incorporate Multimedia applications. This fact brings to an increase in the computational demands of the devices, while still having the limitation of power (and energy) consumption. Instruction memoization is a promising technique to help alleviate the problem of power consumption of expensive functional units such as the floating-point one. Unfortunately, this technique could be energy-inefficient for low-end systems due to the additional power consumption of the relatively big tables required. In this paper we present a novel way of understanding multimedia floating point operations based on the fuzzy computation paradigm: losses in the computation precision may exchange performance for negligible errors in the output. Exploiting the implicit characteristics of media FP computation, we propose a new technique called fuzzy memoization. Fuzzy memoization expands the capabilities of classic memoization by attaching entries with similar inputs to the same output. We present a case of study for a SH4 like processor and report good performance and power-delay improvements with feasible hardware requirements.

Full text

Initial Results on Fuzzy Floating Point Computation for Multimedia Pro cessors Carlos  Alvarez, Jes us Corbal, Esther Salam, Mateo Valero Computer Architecture Department Universitat Politecnica de Catalunya (UPC), Barcelona, Spain. E-mail: f calvarez,jcorbal,esalami,mateo g @ac.up c.es Abstract | During the recentyears, the market of mid/lowend p ortable systems suchasPDAs or mobile digital phones have experimented a revolution in both selling volume and features as handheld devices incorp orate Multimedia applications. This fact brings to an increase in the computational demands of the devices, while still having the limitation of power (and energy) consumption. Instruction memoization is a promising technique to help alleviate the problem of power consumption of expensive functional units such as the oating-point one. Unfortunately, this technique could b e energy-inecientforlow-end systems due to the additional power consumption of the relatively big tables required. In this paper we present a novel way of understanding multimedia oating p oint op erations based on the fuzzy computation paradigm: losses in the computation precision mayexchange p erformance for negligible errors in the output. Exploiting the implicit characteristics of media FP computation, we propose a new technique called fuzzy memoization. Fuzzy memoization expands the capabilities of classic memoization by attaching entries with similar inputs to the same output. Wepresent a case of study for a SH4- like processor and rep ort goo d p erformance and p ower-delay improvements with feasible hardware requirements. Keywords | Fuzzy Computation, Multimedia, Floating Point, Memoization. I. Introduction A RCHITECTURAL techniques targeted at increasing p erformance for low-end systems are nowadays becoming an imp ortant eld of research. However, the potential of the adoption of the same techniques introduced in general-purp ose pro cessors to increase performance in DSP systems is still a matter of controversy. Most authors identify sp eculation and dynamic execution as unsuitable for p ortable systems due to the power and energy ine- ciencies of such techniques. Therefore, many designers of emb edded pro cessors 1] 2] 3] have opted for other techniques that do not jeopardize the power and energy consumption of the system, as for instance, the inclusion of sub-word level SIMD instructions. This pap er deals with the problem of oating-p ointcomputation for multimedia pro cessors targeted at 2D imaging and 3D applications such as the Hitachi SH4 4]. Trends in multimedia applications development indicate that media co des are migrating from xed-p oint to oating-p oint computation to adapt to more complex proto col and media data typ es. Floating point units are exp ensive in terms of b oth area and p ower, and their high latencies are usually Manuscript submitted: 21 Dec. 2001. Manuscript accepted: 23 Jan. 2002. Final manuscript received: 30 Jan. 2002 dicult to hide using in-order pro cessors 5]. A very promising energy-ecient technique to improve p erformance for oating-p ointunits is instruction memoization 6]. It allows to skip the execution of long latency instructions, suchasmultiplication and division, by trying to reuse previously invoked instances of the same op eration with the same source op erands via a look-up table (LUT). The ma jor drawbackof the technique is that large tables are usually required for leveraging signicant reuse rates and so the energy consumption of such tables may oset potential savings. In this pap er we present a novel way of applying the fuzzy computation paradigm to oating-p oint instruction memoization. With fuzzy computation more eective reuse can b e obtained by exploiting the fact that imprecision in calculation can exchange redundancy for negligible errors in the output of multimedia applications 7]. We presentan initial evaluation of the p erformance and p ower b enets of this fuzzy memoization technique in a SH4-like processor. Initial results showagreat potential for high energy and power savings. Given the prop erties of the fuzzy computation, we discuss the trade-os b etween performance and quality of the media outputs. II. Rationale for fuzzy floating-point memoization A. Toleranceinmedia applications Our fo cus is on improving the hit rate of memoization tables by exploiting an intrinsic characteristic of multimedia algorithms: tolerance . By tolerance we understand the robustness of media data typ es (such as image pixels or audio samples) to losses in the precision of computation. Precision of operations can be traded for ahigher value lo cality in oating p oint instructions. In sharp contrast with any other kind of applications, multimedia programs exhibit tolerance to losses in the accuracy of their outputs. Anygiven output of a 3D, video, image or audio application maypresent dierences that are not visually (or audibly) p erceptible. In other words, output "errors" may b e ltered bythehuman senses in such a way that no dierence in the sub jective quality of the result is observed. Fuzzy computation is a novel way of p erforming certain computations that takes advantage of this precise property. Precision in computation is exchanged for time and power savings. If we look closely at typical compression IEEE Computer Architecture Letters Vol. 1, 2002 Posted to IEEE & CSDL on 1/27/2006 DOI 10.1109/L-CA.2002.6 1556-6056/02/$20.00 © 2002 Published by the IEEE Computer Society Accuracy SizeSpeed Binary Systems Compression Protocols Fuzzy Computation Fig. 1. Basis for the Fuzzy Computation Paradigm. algorithms suchas JPEG, MPEG-2 or MP3, we observe that these applications, in fact, exchange qualityfor output compression ratios. Fuzzy computation extends this trade-o with a third dimension: sp eed (as gure 1 illustrates). Two reasons explain why fuzzy computation works: (1) Wehave high redundancy in the data representation. Floating point data represents a muchbroader range of numbers than what is really required for the capacityof human senses. Fuzzy computation takes advantage of the fact that most of the error introduced is overridden bythe nal conversion of data to bounded integer representations. (2) In media pro cessing, the nal destination are the human senses, and human senses have not unlimited capabilities. For example, the h uman eye can distinguish millions of dierent colors, but only some thousands at the same time. Moreover, the information received byhuman senses is pro cessed by the brain, which has a natural tendency to adjust the p erception. For instance, we detect very well edges in the images but detect p o orly dierent color graduations in a at surface, which is a prop ertytypically exploited by fuzzy computation. B. Why oating point fuzzy memoization? The oating-p oint units are not a very critical factor of p erformance and power consumption for aggressive processors. Floating-p oint latency is hidden thanks to out-of- order execution and the energy consumption is not a very signicant part of the whole pro cessor. Nevertheless, in low-end systems, execution is typically in-order, and therefore, the inclusion of oating-point units has a time and power consumption impact that is worth being addressed with sp ecial techniques such as memoization. In this pap er wewant to apply the concept of fuzzy computation to oating-p oint instruction memoization. The Hitachi SH4 4] is a 2-way RISC pro cessor specially targeted at home-videogame systems and hand-held devices. The oating-p oint unit is the most critical part of the design in terms of p ower and area. Our ob jectiveisto evaluate the eect of tolerance over execution time, p ower and output quality when applied to a basic memoization unit targeted at oating-p ointmultiplication and division. LUT FPALU MUX hit/miss op 1 op 2 Result Fig. 2. Hardware conguration of a sequential LUT. III. Fuzzy memoization implementation In classical memoization, two instances of the same operation are only reused when the two pairs of input op erands are identical. Applying the concept of tolerance we can consider that two instances of the same op eration can b e reused not only when their pairs of input operands are equal, but also when they are close enough. As an example, if twomultiplications have as input values 5.00  5.01 and 5.00  5.00 the result of the two will be 25.05, that is the result of the rst multiplication. This implementation of fuzzy computation has the main advantage of being very simple because tolerance is performed by just cutting o the N less signicant bits of every op erand b efore b eing used to access the table. In addition, the table is smaller than in classical memoization b ecause it do es not need to keep the 2  N bits dropp ed. We use this number ofbitsdropped( N ) to dene the level of tolerance. Lo ok up table works as in classical memoization, so if there is a hit in the table, the result (64 bits) is forwarded. If there is a miss, the pair of input op erands is passed to the oating-p oint unit to do the complete op eration and update the reuse table. As we are focusing on the lowpower domain, the table has b een implemented sequentially with the oating-point unit. Therefore, a miss in the table will increase the operation latency by one, but a hit will make the FPALU to not consume anypower (gure 2). As table size is critical, only the two most demanding operations (multiplication and division) were memoized in a single shared table. In addition trivial op erations 8] were treated apart so they do not pollute the reuse table. A. Downsides and limits of fuzzy computing for FP The main drawback of fuzzy computation is, as it has b een already said, the intro duction of an error in the output data. Although there are a lot of computation environments that cannot aord such kind of losses, the special characteristics of media applications make this error not only aordable but negligible. Media outputs are targeted to human senses, so their quality is sub jective and cannot b e easily measured. Great errors that spread out over all the signal (likean increment in the luminosity in entire IEEE Computer Architecture Letters Vol. 1, 2002 Original Image ( N = 0 bits) Go o d Quality( N = 46 bits) Regular Quality( N = 47 bits) Bad Quality( N =48 bits) Fig. 3. Dierent outputs of the algorithm when dierent tolerance levels are used. TABLE I Power Breakdowns of the model. Hardware Structure Percentage of total Power Caches 28 % Registers 1% Instruction Queues 1% Integer Execution Unit 9% Floating Point Unit 30 % Total Clo ckPower 31% image) are hardly p erceived, however, concentrated little errors (like a red dot in a white wall) are easily perceived. This b ehavior makes it dicult to set an ob jective error measure. The most common measure used in the signal pro cessing environment is the Signal Noise Ratio. The SNR is dened as: SN R =20 log P S log P N (1) where P S = row X 1 col X 1 x 2 (2) P N = row X 1 col X 1 ( x ; y ) 2 (3) and x is a pixel of the original image and y is the same pixel of the image with tolerance. The SNR is used to make an ob jective measurement of the quality of the output data. B. Implementation Details To measure the eectiveness of our method we have hacked the SimpleScalar 9] and Wattch10]simulators to incorp orate the Fuzzy LUT at the IEEE double precision multiplication unit. Our mo del was parameterized so that dierent tolerance levels (dierentvalues of N ) can be used. The measures has been applied to the Epic compression algorithm 11]. The Simplescalar and Wattch to ol sets have been congured to mo del a SH4 like processor. The Wattchpower results were scaled down to emulate the ones of a SH4 TABLE I I Configuration of model processor. Pro cessor Core Issue In order Physical Registers 32 Fetch width p er cycle 2 Deco de width p er cycle 2 Issue width p er cycle 2 Commit width p er cycle 2 FP units 1 Integer units 1 Branch prediction Not Taken Floating Point Latencies (issue latencies) Addition 4(3) Multiplication 8(6) Division 24 (24) Memory Hierarchy L1 Dcache Size 16 K L1 Dcache Asso c. 2-way L1 Icache Size 16 K L1 Icache Asso c. 2-way DTLB Size (full asso c) 32 ITLB Size (full asso c) 32 L2 Cache none Pro cess Specications Feature Size .25um Vdd 1.8 V MHz 200 .25 micron technology at 200 MHz and 1.8 Voltage supply. The p ower consumed by the LUTs has been measured using Cacti mo dels and taking into account LUT delayed up date in a miss due to op eration latencies. Table I shows the power breakdowns of the SH4 like pro cessor mo deled and table II shows its hardware characteristics. The total power obtained for the model is a little bit more than 1.3 Watfullpower which is something more than the power declared for an SH4. Nevertheless we are only interested in p ercentage of reduction, so the total p ower is not significant. C. Final Results Figure 4 presents the total power consumption and overall execution time savings obtained with a 10 KB LUT table for dierent tolerance levels. For those cases in which some error is introduced, the SNR of the output image is also included. Two dierent areas can be distinguished. In the rst one (up to 38 bits of tolerance), the tolerance intro duced has nearly no eect in the output image. This area is where fuzzy computing takes benet of the redun- IEEE Computer Architecture Letters Vol. 1, 2002 0 38 39 40 41 42 43 44 45 46 47 Tolerance (N) 0 10 20 30 % Savings SNR power time 61.1 dB 56.3 dB 51.6 dB 48.1 dB 44.2 dB 39.8 dB 35.5 dB 31.8 dB Fig. 4. Total p ower & overall execution time savings with 10 KB LUT. 0 38 39 40 41 42 43 44 45 46 47 Tolerance (N) 0 5 10 15 20 % Savings in energy 1 KB LUT 10 KB LUT 20 KB LUT Fig. 5. Energy savings of dierent size tables. dancy in the representation of the image. If we take out the redundancy we can make the LUT table thinner because we do not need to store the redundant bits however the hit rate do es not increase b ecause bits taken o are not signicant, and so dierent input values remain dierent. In the second area is where we are in fact tolerating, as the same result is assigned to dierent but close enough input values. In this case, both p ower and time are saved at the cost of introducing some error, but as gure 3 shows, errors are negligible until tolerance levelsof46bits. Furthermore, when using low quality output devices (such as handheld screens), 47 or even 48 tolerated bits could b e acceptable. On the other hand, it can be seen that classical memoization ( N = 0) only gets little savings in p ower but sp ends more time than the original conguration. This behavior is due to the low hit rate achieved and the sequential con- guration (so a miss in the LUT means one more cycle p er op eration). In order to avoid this additional cycle, the LUT could b e placed in parallel with the FPALU. However, in that case p ower savings would decrease. In gure 5 weshow the energy savings for dierent table sizes. This table shows that with very cheap tables (less than 1 KB) 10% energy savings can be achieved, while with more aggressive but still feasible tables (10 KB) savings can raise up to a 20%. IV. Summary In this pap er wehaveevaluated the impact of the memoization technique for oating point operations in multimedia for the low-end domain. Wehave shown that although memoization could save some energy, the size of the tables required to achieve these results makes this technique not worth in a lowpower environment. Wehave presented and developed the novel idea of fuzzy computation that could be used in multimedia algorithms to increase the hit rate of memoization tables by doing fuzzy memoization. This new technique has been implemented and evaluated in a low-end mo del pro cessor and it has b een sho wn that reuse is signicantly improved. With realistic table sizes, considerable power and time savings are achieved, up to a 20% in energy and a 25% in the energy-delay pro duct. We b elievethat fuzzy computation op ens anew paradigm for multimedia applications that will deserve future work. Currently we are evaluating other congurations, such as memoizing additions or memoizing complete FP functions (whichwe call Fuzzy Block Reuse). Also more b enchmarks should be included. Acknowledgments This work has been supported by Direccio General de Recerca de la Generalitat under grant 1998FI-00260, by the Ministry of Education of Spain under contract CICYT TIC2001-0995-C02-01 and by the CEPBA. References 1] TI, \TMS320C62XX family ," Tech. Rep. http://www.ti.com/sc/do cs/pro ducts/dsp/tms320c6201.html, Texas Instruments, 1999. 2] Philips Semiconductors, \Trimedia tm-1300," vol. http://wwwus3.semiconductors.com/trimedia/, 1999. 3] Analog Devices, \Introducing tigersharc," Whitepaper , vol. http://www.analog.com/new/ads/html/SHARC2. 4] F. Arakawa, O. Nishii, K. Uchiyama, and N. Nakagawa, \Sh4 risc multimedia pro cessor," March-April 1998. 5] Stuart Franklin Ob erman, \Design issues in high p erformance oating p oint arithmetic units," PhD thesis, Stanford University ,November 1996. 6] D. Citron, D. Feitelson, and L. Rudolph, \Accelerating multimedia pro cessing by implementing memoing in multiplication and division units," ASPLOS VIII , 1998. 7] Carlos Alvarez, Jesus Corbal, Esther Salami, and Mateo Valero, \On the p otential of tolerance reuse for multimedia applications," International ConferenceonSupercomputing, ICS-01, Sorrento, Italy, 2001. 8] Stephen E. Richardson, \Exploiting trivial and redundantcomputation," 11th IEEE Symposium on Computer Arithmetic , 1993. 9] Doug Burger and Todd M. Austin, \The simplescalar tool set, version 2.0," Wisconsin-Madison CS Dep. technical Report #1342 , 1997. 10] David Bro oks, Vivek Tiwari, and Margaret Martonosi, \Wattch: A framework for architectural-level p ower analysis and optimizations," International Symposium on Computer Architecture, ISCA27, Vancouver ,2000. 11] C. Lee, M. Potkonjak, and W.H. Magione-Smith, \Mediabench: Atoolforevaluating and synthesizing multimedia and communication systems," MICRO30 , 1997. IEEE Computer Architecture Letters Vol. 1, 2002