High-Productivity Stream Programming For High-Performance Sy

发布时间:2021-06-05

Applications that are structured around some notion of a “stream ” are increasingly prevalent to common computing practices, and there is evidence that streaming media applications already consume a substantial fraction of the computation cycles on consu

High-ProductivityStreamProgrammingFor

High-PerformanceSystems

RodricRabbah,BillThies,MichaelGordon,JanisSermulins,andSamanAmarasinghe

ComputerScienceandArti cialIntelligenceLaboratory

MassachusettsInstituteofTechnology

{rabbah,thies,mgordon,janiss,saman}@csail.mit.edu

Applicationsthatarestructuredaroundsomenotionofa“stream”areincreasinglyprevalenttocommoncomputingpractices,andthereisevidencethatstreamingmediaapplicationsalreadyconsumeasubstantialfractionofthecom-putationcyclesonconsumermachines[6].Furthermore,streamprocessing—ofvoiceandvideodata—iscentraltoaplethoraofembeddedsystems,includinghand-heldcomputers,cellphones,andDSPs.Thestreamabstractionisalsofundamentaltohigh-performancesystemssuchasintelligentsoftwarerouters,cellphonebasestations,andHDTVeditingconsoles.

Despitetheprevalenceoftheseapplications,thereissurprisinglylittlelanguageandcompilersupportforpractical,large-scalestreamprogramming.Ofcourse,thenotionofastreamasaprogrammingabstractionwasestablisheddecadesago[1],andanumberofspecial-purposestreamlanguagesexisttoday(see[8]forareview).Manyoftheselanguagesandrepresentationsareelegantandtheoreticallysound,buttheyareoftentooin exibletosupportstraightforwarddevelopmentofmodernstreamapplications,ortheirimplementationsaretooinef cienttouseinpractice.Consequently,mostprogrammersresorttogeneral-purposelanguagessuchasCorC++toimplementstreamprograms.Yetthereareseveralreasonswhygeneral-purposelanguagesareinadequateforstreamprogramming.Mostnotably,theydonotprovideanaturalorintuitiverepresentationofstreams,therebyreducingreadability,robustness,andprogrammerproductivity.Moreover,becausethewidespreadparallelismandregularcommunicationpatternsofdatastreamsareleftimplicitingeneral-purposelanguages,compilersarenotstream-consciousanddonotperformstream-speci coptimizations.Asaresult,performance-criticalloopsareoftenhand-codedinalow-levelassemblylanguageandmustbere-implementedforeachtargetarchitecture.Thispracticeislabor-intensive,error-prone,andverycostly.

TheStreamItlanguageandcompilereffortatMITisgearedtowardboostingprogrammer-productivitywhilecon-comitantlydeliveringhigh-performanceforawidearrayofcomputingtargets.TheStreamItlanguagefeaturesseveralnoveltiesthatareessentialforlargescaleprogramdevelopment:thelanguageismodular,parameterizable,malleableandarchitectureindependent.Inaddition,thelanguageexposesthewidespreadparallelismandcommunicationpat-ternsthatareinherentinmanystreamingprograms,andasaresult,thecompilercanapplyaggressiveoptimizationsthatareinfeasibletoperformwhenusingconventionallanguages.TheStreamItcompilercandeliverhighperfor-mancecodes—withspeedupsrangingupto4.5×—forawidearrayofcomputingtargets,includingembeddedanddesktopuniprocessors(e.g.,StrongARM,IA32,andIA64),tiledandmulticorearchitectures(e.g.,Raw[11]),orgridcomputingsystems(e.g.,aclusterofworkstationsinterconnectedbyahigh-speedlocalareanetwork).

Ourcompilationinfrastructureautomatesseveraldomain-speci coptimizationsthatarewellknownintheDSPdo-main.Inaddition,thecompilerincludesoptimizationsforcomputationreordering,loadbalancing,layout,androuting;allofwhicharesigni cantlyimportantinhigh-performanceparallelanddistributedcomputingsystems.Thecompilercanalsoapplyaseriesofcache-wareoptimizationstoimprovetheperformanceofthememorysystemandamelioratetheeffectsofthe“memorywall”.Furthermore,wehavedevelopedagraphicalintegrateddevelopmentenvironment[4]thatprovidesanelaboratedebuggingframeworktointerpretandvisuallyrepresentstreamingcomputation,includingthe owofinformationinparallelanddistributedstreamingprograms.

WebelieveStreamItmakesagreatstridetowarddeliveringthepromiseofMoore’sLawtotheend-user.TheStreamItlanguage,compiler,anddevelopmentenvironmentempowersoftwareengineersandapplicationdeveloperstoproductivelyprogramstreamingsysteminwhatistodaythenear-exclusivedomainofexperts.

精彩图片

热门精选

大家正在看