Movatterモバイル変換


[0]ホーム

URL:


Next:, Previous:, Up:Machine-Dependent Options   [Contents][Index]


3.21.36 Nvidia PTX Options

These options are defined for Nvidia PTX:

-m64

Ignored, but preserved for backward compatibility. Only 64-bit ABI issupported.

-march=architecture-string

Generate code for the specified PTX ISA target architecture.Valid architecture strings are‘sm_30’, ‘sm_35’, ‘sm_37’,‘sm_52’, ‘sm_53’,‘sm_61’,‘sm_70’, ‘sm_75’,‘sm_80’, and ‘sm_89’.The default depends on how the compiler has been configured, see--with-arch.

This option sets the value of the preprocessor macro__PTX_SM__; for instance, for ‘sm_35’, it has the value‘350’.

-misa=architecture-string

Alias of-march=.

-march-map=architecture-string

Select the closest available-march= value that is not morecapable. For instance, for-march-map=sm_50 select-march=sm_37, and for-march-map=sm_53 select-march=sm_53.

-mptx=version-string

Generate code for the specified PTX ISA version.Valid version strings are‘3.1’,‘4.1’, ‘4.2’,‘5.0’,‘6.0’, ‘6.3’,‘7.0’, ‘7.3’, and ‘7.8’.The default PTX ISA version is the one that added support for theselected PTX ISA target architecture, see-march=, but atleast ‘6.3’, or ‘7.3’ for-march=sm_52 and higher.

This option sets the values of the preprocessor macros__PTX_ISA_VERSION_MAJOR__ and__PTX_ISA_VERSION_MINOR__;for instance, for ‘3.1’ the macros have the values ‘3’ and‘1’, respectively.

-mmainkernel

Link in code for a __main kernel. This is for stand-alone instead ofoffloading execution.

-moptimize
-mno-optimize

Enable/disable partitioned execution optimizations. This option is enabled bydefault when any level of optimization is selected.

-msoft-stack
-mno-soft-stack

For-mno-soft-stack (the default, unless-mgomp hasbeen specified), use PTX “native” stacks, that is,generate code that uses.local memory or PTXallocadirectly for stack storage.Unless-mptx=7.3 or higher and-march=sm_52 orhigher are active, variable-length arrays and dynamically allocatingmemory on the stack withalloca are not supported.

For-msoft-stack (implied by-mgomp),generate code that does not use.local memory or PTXallocadirectly for stack storage. Instead, a per-warp stack pointer ismaintained explicitly. This enables variable-length stack allocation (withvariable-length arrays oralloca), and when global memory is used forunderlying storage, makes it possible to access automatic variables from otherthreads, or with atomic instructions. This code generation variant is usedfor OpenMP offloading, but the option is exposed on its own for the purposeof testing the compiler; to generate code suitable for linking into programsusing OpenMP offloading, use option-mgomp.

-msoft-stack-reserve-local=size

Specify the size of.local memory used for the stack when theexact amount is not known. It defaults to 128.

-muniform-simt
-mno-uniform-simt

Enable/disable code generation variant that allows execution ofall threads in eachwarp, while maintaining memory state and side effects as if only one threadin each warp was active outside of OpenMP SIMD regions. All atomic operationsand calls to runtime (malloc,free,vprintf)are conditionally executed (iffcurrent lane index equals the master lane index), and the register beingassigned is copied via a shuffle instruction from the master lane. Outside ofSIMD regions lane 0 is the master; inside, each thread sees itself as themaster. Shared memory arrayint __nvptx_uni[] stores all-zeros orall-ones bitmasks for each warp, indicating current mode (0 outside of SIMDregions). Each thread can bitwise-and the bitmask at positiontid.ywith current lane index to compute the master lane index.

-mgomp
-mno-gomp

Enable/disable generation of code for use in OpenMP offloading.-mgomp enables-msoft-stack and-muniform-simt options, and selects a corresponding multilib variant.


Next:OpenRISC Options, Previous:NDS32 Options, Up:Machine-Dependent Options   [Contents][Index]


[8]ページ先頭

©2009-2026 Movatter.jp