hgprune使用指南(v2.1)

更新时间:
复制为 MD 格式

usage

hgprune [options] -o <outfile> <infile>

hgprune接受一个输入文件,对该输入文件裁剪后,产生一个输出文件。

input file必须是relocatable binary或者static library(.a),输出文件和输入文件格式相同

必须通过--arch 或者 -generate-code指定要保留的ppu target。其他所有ppu targetdevice code将会在output file中被删除。

hgprune --arch hggc-ppu-ppu001 libac_base.a -o libac_base_pruned.a

上面的命令只保留libac_base.a中属于ppu001elf,ppu001bc以及其他ppu targetdevice code会在输出文件中删除。

Command-line Options

Option (long)

Option (short)

Description

--arch ...

-arch

指定在output file中保留的ppu target binary
可选的target为:
1. hggc-ppu-ppu001,对应ppu001 elf
2. hgvm-ppu-ppu001,对应ppu001 bc file

--generate-code

-gencode

等价于nvcc -gencode选项,可选的keycode,arch。只有code会被解析,用来匹配ppu target

--no-relocatable-elf

-no-relocatable-elf

删除所有relocatable elf

--output-file

-o

output file

--options-file

-optf

使用option file里面的option调用hgprune

--version

-v

输出版本信息

--help

-h

输出help information