梦见自己大笑是什么意思| 玉米炒什么好吃| 柿子不能跟什么一起吃| gt是什么意思| 唠叨是什么意思| 苏州有什么好玩的地方| 西咪替丁是治什么病| 河汉是什么意思| hl是什么意思| 干什么一天能挣1000元| 孩子积食吃什么药| 时令是什么意思| 雪媚娘是什么| 什么是嘌呤| 什么人需要做心脏造影| 想吃辣是身体缺乏什么| 过火是什么意思| 外强中干什么意思| xy是什么意思| 烫伤起泡用什么药膏| 狸是什么动物| 什么药膏能让疣体脱落| 将至是什么意思| 江西特产有什么| 小孩体质差吃什么能增强抵抗力| 海清是什么意思| 延长收货是什么意思| 什么是人格分裂| 哺乳期吃什么奶水多| 脚趾甲变厚是什么原因| 丘疹性荨麻疹用什么药| 炖牛肉放什么调料| 交界性心律是什么意思| 粉蒸肉的粉是什么粉| 感冒吃什么消炎药效果好| 一个既一个旦念什么| 黑丝是什么| 为什么医生爱开喜炎平| 荨麻疹是什么症状| 鸽子拉绿稀便是什么病| 上眼皮痒是什么原因| 早上打喷嚏是什么预兆| 低级别上皮内瘤变是什么意思| 子宫囊肿严重吗有什么危害| 头晕喝什么饮料| 眉心长痘痘什么原因| 红玛瑙五行属什么| 洲际导弹是什么意思| bodywash是什么意思| 脚趾头疼是什么原因| 脓肿是什么病| 抚触是什么意思| 肺大泡是什么病| xsh是什么意思| 番茄酱可以做什么菜| 阴道为什么会排气| 吃什么能让月经量增多| 88年五行属什么| 射手座与什么星座最配| 为什么会血热| 怀孕前一周有什么症状| 梦见金蛇有什么预兆| 羊水透声欠佳什么意思| 牙龈出血是什么病的前兆| 眩晕挂什么科| 谈情说爱是什么意思| eos是什么| 一直干咳是什么原因| 姨妈有血块是什么原因| 凤仙花长什么样| 19年是什么年| 经产妇是什么意思| 湿气是什么意思| 腿上血栓是什么症状| 人参片泡水喝有什么功效和作用| 虫草什么时候吃最好| 大败毒胶囊主治什么病| 什么是发物| 奶奶和孙女是什么关系| 阿达是什么意思| 1999年发生了什么| 午时属什么生肖| 愈合是什么意思| nub是什么意思| 甘油三酯高是什么原因引起的| 急性胃肠炎吃什么药| 咖啡喝了有什么好处| 待业是什么意思| 子母门是什么意思| 黑化是什么意思| 典史是什么官| 拉肚子出血是什么原因| 什么是尿崩症| 撇嘴是什么意思| ad是什么缩写| 葵瓜子吃多了有什么危害| 幡然醒悟是什么意思| 甲状腺4级是什么意思| 桑榆未晚是什么意思| 腰扭伤吃什么药| kumpoo是什么牌子| 腐男是什么意思| 工夫是什么意思| 克隆是什么意思| 三个火读什么字| 链球菌感染是什么病| 下巴下面是什么部位| 诈尸是什么意思| 舌苔白吃什么药效果好| 治标不治本是什么意思| 任性妄为是什么意思| 昱念什么| 大肠杆菌属于什么菌| 隐翅虫吃什么| 头不舒服去医院挂什么科| 九五至尊什么意思| 什么情况下才做冠脉cta| 哺乳期可以吃什么消炎药| 卖是什么意思| 玉帝叫什么名字| 长口腔溃疡是什么原因| 甲状腺不均质改变是什么意思| 肠胃炎吃什么药效果好| 低密度脂蛋白高有什么危害| 经常勃起是什么原因| 蓝莓有什么好处| 85年属什么| 两肺少许纤维灶是什么意思| 理想主义是什么意思| 中国国鸟是什么| 手心发热是什么原因| 缺铁性贫血吃什么食物| 雾化主要治疗什么| 黄帝叫什么| joy是什么意思| 狗的尾巴有什么作用| 秦始皇为什么叫祖龙| 二月二十二日是什么星座| 睾丸是什么东西| 隋朝之前是什么朝代| 肾不好是什么原因引起的| 紫癜病是什么病| 一什么湖面| 上大厕拉出血是什么原因| 心绞痛是什么原因引起的| 做鸡蛋饼用什么面粉好| 做梦被打了是什么意思| 尾骨疼是什么原因| 甲减有什么症状表现| 菩提子是什么树的种子| 荨麻疹用什么药最好| 康复治疗技术是什么| slf是什么意思| 什么病不能吃芒果| 卟啉症是什么病| 客家是什么意思| 献血有什么危害| 陨石有什么作用和功效| 窦性心律过缓吃什么药| 检查脂肪肝做什么检查| iphone5什么时候出的| 4月29日是什么星座| 痛风什么引起的原因有哪些| 面肌痉挛吃什么药效果好| 沄字五行属什么| 井底之蛙是什么意思| 人放屁多是什么原因| 手机电池是什么电池| 小便很黄是什么原因| 消化不良吃什么水果好| 玻璃瓶属于什么垃圾| 复合是什么意思| 阴唇外翻是什么原因| 丝瓜有什么好处| 二郎神是什么生肖| 成本倒挂什么意思| 车厘子什么时候成熟| 右耳朵热代表什么意思| 皮赘是什么原因引起的| 为什么鸡蛋不能和牛奶一起吃| 日央读什么| 梦见蟑螂是什么意思| 文科女生学什么专业就业前景好| 12583是什么电话| nba是什么意思的缩写| 为什么屎是臭的| 干咳无痰吃什么药效果最好| 感冒了吃什么水果比较好| ag医学上是什么意思| 吃什么美容养颜抗衰老| 水加人念什么| 花名册是什么意思| 一直拉肚子吃什么药| cm是什么岗位| nag是什么意思| 笑靥如花什么意思| 鳡鱼是什么鱼| 火烧是什么食物| 登革热是什么症状| 查肝炎做什么检查项目| 癫痫病吃什么药| 证监会是干什么的| aba是什么意思| chip什么意思| 擦伤涂什么药膏| 月加亏念什么| 脸上起疙瘩是什么原因| 梓代表什么意思| 狗咬到什么程度需要打针| 白头翁吃什么| 处女膜在什么位置| 送镜子代表什么意思| 梦见自己假牙掉了是什么意思| 左侧卵巢内无回声是什么意思| 颈部淋巴结肿大是什么原因| 叙字五行属什么| 燕窝什么季节吃最好| 身体抽搐是什么原因| 大咖是什么意思| 弃猫效应是什么| hf医学上是什么意思| 薇诺娜适合什么年龄| 反应性增生是什么意思| 什么是辐射| 吃什么饭| 治疗hpv病毒用什么药| 拍肺部片子挂什么科| 莆田系是什么意思啊| 满是什么结构| 上热下寒吃什么药| 打佛七什么意思| 脚丫痒是什么原因| 薄荷叶泡水喝有什么功效和作用| 脸上长痣是什么原因| ofd是什么意思| 中超是什么| 解表药是什么意思| 中科院是干什么的| 贡眉是什么茶| 白带多用什么药| 女生做彩超是检查什么| 过敏性鼻炎挂什么科室| 胃热吃什么药效果好| xyz是什么意思| 拔牙后能吃什么| 於是什么意思| dvd是什么意思| 12年一个轮回叫什么| 18号来月经什么时候是排卵期| 多多保重是什么生肖| 颈椎病看什么科最好| 对牛弹琴是什么意思| 怀孕前壁和后壁有什么区别| 高中生物学什么| 乙肝e抗体阴性是什么意思| 生理需要是什么意思| 糖尿病患者适合吃什么水果| 鸽子拉绿稀便是什么病| 帆布是什么材质| 白癜风早期症状是什么| 婴儿哭久了有什么危害| 孕妇不能吃什么东西| 散射光是什么意思| 肺鳞癌是什么意思| 百度Jump to content

尿味大是什么原因

From Wikipedia, the free encyclopedia
百度 第二十四条互联网信息服务提供者在其业务活动中,违反其他法律、法规的,由新闻、出版、教育、卫生、药品监督管理和工商行政管理等有关主管部门依照有关法律、法规的规定处罚。

OpenHMPP (HMPP[1] for Hybrid Multicore Parallel Programming) - programming standard for heterogeneous computing. Based on a set of compiler directives, standard is a programming model designed to handle hardware accelerators without the complexity associated with GPU programming. This approach based on directives has been implemented because they enable a loose relationship between an application code and the use of a hardware accelerator (HWA).

Introduction

[edit]

The OpenHMPP directive-based programming model offers a syntax to offload computations on hardware accelerators and to optimize data movement to/from the hardware memory.

The model is based on works initialized by CAPS (Compiler and Architecture for Embedded and Superscalar Processors), a common project from INRIA, CNRS, the University of Rennes 1 and the INSA of Rennes.

OpenHMPP concept

[edit]

OpenHMPP is based on the concept of codelets, functions that can be remotely executed on HWAs.

The OpenHMPP codelet concept

[edit]

A codelet has the following properties:

  1. It is a pure function.
    • It does not contain static or volatile variable declarations nor refer to any global variables except if these have been declared by a HMPP directive “resident”
    • It does not contain any function calls with an invisible body (that cannot be inlined). This includes the use of libraries and system functions such as malloc, printf, ...
    • Every function call must refer to a static pure function (no function pointers).
  2. It does not return any value (void function in C or a subroutine in Fortran).
  3. The number of arguments should be fixed (i.e. it can not be a variadic function as in stdarg.h in C).
  4. It is not recursive.
  5. Its parameters are assumed to be non-aliased (see Aliasing (computing) and Pointer aliasing).
  6. It does not contain callsite directives (i.e. RPC to another codelet) or other HMPP directives.

These properties ensure that a codelet RPC can be remotely executed by a HWA. This RPC and its associated data transfers can be asynchronous.

Codelet RPCs

[edit]

HMPP provides synchronous and asynchronous RPC. Implementation of asynchronous operation is hardware dependent.

Synchronous versus asynchronous RPC

HMPP Memory Model

[edit]

HMPP considers two address spaces: the host processor one and the HWA memory.

HMPP memory Model

Directives concept

[edit]

The OpenHMPP directives may be seen as “meta-information” added in the application source code. They are safe meta-information i.e. they do not change the original code behavior. They address the remote execution (RPC) of a function as well as the transfers of data to/from the HWA memory.

The table below introduces the OpenHMPP directives. OpenHMPP directives address different needs: some of them are dedicated to declarations and others are dedicated to the management of the execution.

Control flow instructions Directives for data management
Declarations codelet
group
resident
map
mapbyname
Operational Directives callsite
synchronize
region
allocate
release
advancedload
delegatedstore

Concept of set of directives

[edit]

One of the fundamental points of the HMPP approach is the concept of directives and their associated labels which makes it possible to expose a coherent structure on a whole set of directives disseminated in an application.

There are two kinds of labels:

  • One associated to a codelet. In general, the directives carrying this kind of labels are limited to the management of only one codelet (called stand-alone codelet in the remainder of the document to distinguish it from the group of codelets).
  • One associated to a group of codelets. These labels are noted as follow: “<LabelOfGroup>“, where “LabelOfGroup” is a name specified by the user. In general, the directives which have a label of this type relate to the whole group. The concept of group is reserved to a class of problems which requires a specific management of the data throughout the application to obtain performance.

OpenHMPP Directives Syntax

[edit]

In order to simplify the notations, regular expressions will be used to describe the syntax of the HMPP directives.

The color convention below is used for the description of syntax directives:

  • Reserved HMPP keywords are in green;
  • Elements of grammar which can be declined in HMPP keywords are in red;
  • User's variables remain in black.

General syntax

[edit]

The general syntax of OpenHMPP directives is:

  • For C language:
#pragma hmpp <grp_label> [codelet_label]? directive_type [,directive_parameters]* [&]
  • For FORTRAN language:
!$hmpp <grp_label> [codelet_label]? directive_type [,directive_parameters]* [&]

Where:

  • <grp_label>: is a unique identifier naming a group of codelets. In cases where no groups are defined in the application, this label can simply miss. Legal label name must follow this grammar: [a-zA-Z_][a-zA-Z0-9_]*. Note that the “< >” characters belong to the syntax and are mandatory for this kind of label.
  • codelet_label: is a unique identifier naming a codelet. Legal label name must follow this grammar: [a-zA-Z_][a-zA-Z0-9_]*
  • directive: is the name of the directive;
  • directive_parameters: designates some parameters associated to the directive. These parameters may be of different kinds and specify either some arguments given to the directive either a mode of execution (asynchronous versus synchronous for example);
  • [&]: is a character used to continue the directive on the next line (same for C and FORTRAN).

Directive parameters

[edit]

The parameters associated to a directive may be of different types. Below are the directive parameters defined in OpenHMPP:

  • version = major.minor[.micro]: specifies the version of the HMPP directives to be considered by the preprocessor.
  • args[arg_items].size={dimsize[,dimsize]*}: specifies the size of a non scalar parameter (an array).
  • args[arg_items].io=[in|out|inout]: indicates that the specified function arguments are either input, output or both. By default, unqualified arguments are inputs.
  • cond = "expr": specifies an execution condition as a boolean C or Fortran expression that needs to be true in order to start the execution of the group or codelets.
  • target=target_name[:target_name]*: specifies which targets to try to use in the given order.
  • asynchronous: specifies that the codelet execution is not blocking (default is synchronous).
  • args[<arg_items>].advancedload=true: indicates that the specified parameters are preloaded. Only in or inout parameters can be preloaded.
  • args[arg_items].noupdate=true: this property specifies that the data is already available on the HWA and so that no transfer is needed. When this property is set, no transfer is done on the considered argument
  • args[<arg_items>].addr="<expr>": <expr> is an expression that gives the address of the data to upload.
  • args[<arg_items>].const=true: indicates that the argument is to be uploaded only once.

OpenHMPP directives

[edit]

Directives for declaring and executing a codelet

[edit]

A codelet directive declares a computation to be remotely executed on a hardware accelerator. For the codelet directive:

  • The codelet label is mandatory and must be unique in the application
  • The group label is not required if no group is defined.
  • The codelet directive is inserted just before the function declaration.

The syntax of the directive is:

#pragma hmpp <grp_label> codelet_label codelet 
                            [, version = major.minor[.micro]?]?
                            [, args[arg_items].io=[[in|out|inout]]*
                            [, args[arg_items].size={dimsize[,dimsize]*}]*
                            [, args[arg_items].const=true]*
                            [, cond = "expr"]
                            [, target=target_name[:target_name]*]

More than one codelet directive can be added to a function in order to specify different uses or different execution contexts. However, there can be only one codelet directive for a given call site label.

The callsite directive specifies how the use a codelet at a given point in the program.

The syntax of the directive is:

#pragma hmpp <grp_label> codelet_label callsite
                     [, asynchronous]?
                     [, args[arg_items].size={dimsize[,dimsize]*}]*
                     [, args[arg_items].advancedload=[[true|false]]*
                     [, args[arg_items].addr="expr"]*
                     [, args[arg_items].noupdate=true]*

An example is shown here :

 /* declaration of the codelet */
 #pragma hmpp simple1 codelet, args[outv].io=inout, target=CUDA
 static void matvec(int sn, int sm, float inv[sm], float inm[sn][sm], float *outv){
     int i, j;
     for (i = 0 ; i < sm ; i++) {
       float temp = outv[i];
       for (j = 0 ; j < sn ; j++) {
         temp += inv[j] * inm[i][ j];
     }
    outv[i] = temp;
  }
  
  int main(int argc, char **argv) {
    int n;
    ........
  
  /* codelet use */
  #pragma hmpp simple1 callsite, args[outv].size={n}
  matvec(n, m, myinc, inm, myoutv);
    ........
  }

In some cases, a specific management of the data throughout the application is required (CPU/GPU data movements optimization, shared variables...).

The group directive allows the declaration of a group of codelets. The parameters defined in this directive are applied to all codelets belonging to the group. The syntax of the directive is:

#pragma hmpp <grp_label> group 
                          [, version = <major>.<minor>[.<micro>]?]? 
                          [, target = target_name[:target_name]*]]? 
                          [, cond  = “expr]?

Data transfers directives to optimize communication overhead

[edit]

When using a HWA, the main bottleneck is often the data transfers between the HWA and the main processor.
To limit the communication overhead, data transfers can be overlapped with successive executions of the same codelet by using the asynchronous property of the HWA.

  • allocate directive

The allocate directive locks the HWA and allocates the needed amount of memory.

#pragma hmpp <grp_label> allocate [,args[arg_items].size={dimsize[,dimsize]*}]*
  • release directive

The release directive specifies when to release the HWA for a group or a stand-alone codelet.

#pragma hmpp <grp_label> release
  • advancedload directive

The advancedload directive prefetches data before the remote execution of the codelet.

#pragma hmpp <grp_label> [codelet_label]? advancedload
                  ,args[arg_items]
                  [,args[arg_items].size={dimsize[,dimsize]*}]*
                  [,args[arg_items].addr="expr"]*
                  [,args[arg_items].section={[subscript_triplet,]+}]*
                  [,asynchronous]
  • delegatedstore directive

The delegatedstore directive is a synchronization barrier to wait for an asynchronous codelet execution to complete and to then download the results.

#pragma hmpp <grp_label> [codelet_label]? delegatedstore 
                ,args[arg_items]
                [,args[arg_items].addr="expr"]*
                [,args[arg_items].section={[subscript_triplet,]+}]*
  • Asynchronous Computations

The synchronize directive specifies to wait until the completion of an asynchronous callsite execution. For the synchronize directive, the codelet label is always mandatory and the group label is required if the codelet belongs to a group.

#pragma hmpp <grp_label> codelet_label synchronize
  • Example

In the following example, the device initialization, memory allocation and upload of the input data are done only once outside the loop and not in each iteration of the loop.

The synchronize directive allows to wait for the asynchronous execution of the codelet to complete before launching another iteration. Finally the delegatedstore directive outside the loop uploads the sgemm result.

 int main(int argc, char **argv) {
 
 #pragma hmpp sgemm allocate, args[vin1;vin2;vout].size={size,size}
 #pragma hmpp sgemm advancedload, args[vin1;vin2;vout], args[m,n,k,alpha,beta]
   
 for ( j = 0 ; j < 2 ; j ++) {
    #pragma hmpp sgemm callsite, asynchronous, args[vin1;vin2;vout].advancedload=true, args[m,n,k,alpha,beta].advancedload=true
    sgemm (size, size, size, alpha, vin1, vin2, beta, vout);
    #pragma hmpp sgemm  synchronize
 }
 
 #pragma hmpp sgemm delegatedstore, args[vout]
 #pragma hmpp sgemm release

Sharing data between codelets

[edit]

Those directives map together all the arguments sharing the given name for all the group.

The types and dimensions of all mapped arguments must be identical.

The map directive maps several arguments on the device.

#pragma hmpp <grp_label>  map, args[arg_items]

This directive is quite similar as the map directive except that the arguments to be mapped are directly specified by their name. The mapbyname directive is equivalent to multiple map directives.

#pragma hmpp <grp_label> mapbyname [,variableName]+

Global variable

[edit]

The resident directive declares some variables as global within a group. Those variables can then be directly accessed from any codelet belonging to the group. This directive applies to the declaration statement just following it in the source code.

The syntax of this directive is:

#pragma hmpp <grp_label> resident 
               [, args[::var_name].io=[[in|out|inout]]*
               [, args[::var_name].size={dimsize[,dimsize]*}]*
               [, args[::var_name].addr="expr"]*
               [, args[::var_name].const=true]*

The notation ::var_name with the prefix ::, indicates an application's variable declared as resident.

Acceleration of regions

[edit]

A region is a merge of the codelet/callsite directives. The goal is to avoid code restructuration to build the codelet. Therefore, all the attributes available for codelet or callsite directives can be used on regions directives.

In C language:

#pragma hmpp [<MyGroup>] [label] region         
                           [, args[arg_items].io=[[in|out|inout]]*
                           [, cond = "expr"]<
                           [, args[arg_items].const=true]*
                           [, target=target_name[:target_name]*]
                           [, args[arg_items].size={dimsize[,dimsize]*}]*
                           [, args[arg_items].advancedload=[[true|false]]*
                           [, args[arg_items].addr="expr"]*
                           [, args[arg_items].noupdate=true]*
                           [, asynchronous]?
                           [, private=[arg_items]]*
   {
C BLOCK STATEMENTS
   }

Implementations

[edit]

The OpenHMPP Open Standard is based on HMPP Version 2.3 (May 2009, CAPS entreprise).

The OpenHMPP directive-based programming model is implemented in:

  • CAPS Compilers, CAPS Entreprise compilers for hybrid computing
  • PathScale ENZO Compiler Suite (support the NVIDIA GPUs)

OpenHMPP is used by HPC actors[who?] in Oil & Gas,[citation needed] Energy,[citation needed] Manufacturing,[citation needed] Finance,[citation needed] Education & Research.[citation needed]

See also

[edit]

References

[edit]
  1. ^ Dolbeau, Romain; Bihan, Stéphane; Bodin, Fran?ois (4 October 2007). HMPP: A Hybrid Multi-core Parallel Programming Environment (PDF). Workshop on General Purpose Processing on Graphics Processing Units. Archived from the original (PDF) on 16 January 2014. Retrieved 14 January 2014.
奥美拉唑什么时候吃最好 光绪是慈禧的什么人 张扬是什么意思 产值是什么 阿拉伯是什么意思
高危病变是什么意思 siri什么意思 心脏早搏吃什么药好 普罗帕酮又叫什么 晚上喝什么茶不影响睡眠
睾丸扭转是什么导致的 蚊子的天敌是什么 feat什么意思 mlf是什么意思 酸菜鱼里面加什么配菜好吃
为什么会闰月 巧克力囊肿是什么意思 晚上喝牛奶有什么好处和坏处 今年67岁属什么生肖 完璧归赵发生在什么时期
叶酸起什么作用hcv8jop1ns7r.cn 附睾炎是什么原因引起的hcv8jop2ns3r.cn 超市属于什么行业hcv9jop3ns9r.cn 唐伯虎是什么生肖hcv8jop5ns6r.cn 榴莲为什么那么贵hcv7jop9ns5r.cn
马甲是什么意思?hcv8jop2ns6r.cn 梅雨季节什么时候结束hcv8jop1ns5r.cn 包粽子的叶子叫什么hcv7jop4ns5r.cn 什么是冰种翡翠hcv8jop5ns7r.cn 交媾是什么意思bjhyzcsm.com
gbs检查是什么hcv7jop9ns5r.cn 女性肛门坠胀看什么科hcv8jop4ns4r.cn 一什么马hcv8jop9ns1r.cn 多汗症是什么原因jingluanji.com 三番四次是什么生肖fenrenren.com
原位杂交技术检查什么hcv8jop6ns7r.cn 胃酸分泌过多是什么原因造成的hcv9jop5ns7r.cn 吃什么可以增大阴茎hcv8jop4ns9r.cn 艾滋病有什么症状图片hcv8jop3ns6r.cn 士多店是什么意思hcv9jop7ns0r.cn
百度