Skip to content
hyqneuron edited this page Mar 22, 2015 · 1 revision

Usage:

asfermi sourcefile [Options [option arguments]]

Source file must be the first command-line option. However, it could be replaced by a -I option specified below.

For how a source file should look like, please see CodeExample.

Options:

  • -I "instruction"
    This can be used to replace the inputfile. A single line of instruction, surrounded by double quotation marks, will be processed as source input. Note that comments and directives are not supported in this mode.
  • -o outputfile
    Output cubin to the specified file.
  • -r target_cubin .text.kernel_name kernel_offset
    Replace the opcodes in specified location of a kernel in a specified cubin file with the assembled opcodes. Note that the kernel name must be prefixed with .text. to indicate the complete cubin section name.
  • -sm_20
    output cubin for architecture sm\_20. This is the default architecture assumed by asfermi.
  • -sm_21
    output cubin for architecture sm\_21.
  • -32
    output 32-bit cubin. This is the default behaviour.
  • -64
    output 64-bit cubin.
  • -SelfDebug
    throw unhandled exception when things go wrong. For debugging of asfermi only.
Clone this wiki locally