public final class CudaJitOptions
extends java.lang.Object
implements java.lang.Cloneable
CudaJitOptions
class represents a set of options that influence
the behavior of linking and loading modules.Modifier and Type | Class and Description |
---|---|
static class |
CudaJitOptions.CacheMode
CacheMode identifies the cache management choices. |
static class |
CudaJitOptions.Fallback
Fallback identifies the available fall-back strategies
when an exactly matching object is not available. |
Constructor and Description |
---|
CudaJitOptions()
Creates a new options object.
|
Modifier and Type | Method and Description |
---|---|
protected CudaJitOptions |
clone()
Creates a new options object with the same state as this object.
|
java.lang.String |
getErrorLogBuffer()
Returns the contents of the error log.
|
java.lang.String |
getInfoLogBuffer()
Returns the contents of the information log.
|
int |
getThreadsPerBlock()
Returns the maximum number of threads per block.
|
float |
getWallTime()
Returns the total elapsed time, in milliseconds,
spent in the compiler and linker.
|
CudaJitOptions |
recordWallTime()
Requests recording of the total wall clock time,
in milliseconds, spent in the compiler and linker.
|
CudaJitOptions |
setCacheMode(CudaJitOptions.CacheMode mode)
Specifies the desired caching behavior (-dlcm).
|
CudaJitOptions |
setErrorLogBufferSize(int size)
Specifies the size, in bytes, to allocate for capturing error messages.
|
CudaJitOptions |
setGenerateDebugInfo(boolean enabled)
Specifies whether to generate debug information.
|
CudaJitOptions |
setGenerateLineInfo(boolean enabled)
Specifies whether to generate line number information.
|
CudaJitOptions |
setInfoLogBufferSize(int size)
Specifies the size, in bytes, to allocate for capturing informational
messages.
|
CudaJitOptions |
setJitFallbackStrategy(CudaJitOptions.Fallback strategy)
Specifies the fallback strategy if an exactly matching
binary object cannot be found.
|
CudaJitOptions |
setLogVerbose(boolean verbose)
Specifies whether to generate verbose log messages.
|
CudaJitOptions |
setMaxRegisters(int limit)
Specifies the maximum number of registers that a thread may use.
|
CudaJitOptions |
setOptimizationLevel(int level)
Specifies the level of optimization to be applied to generated code
(0 - 4), with 4 being the default and highest level of optimization.
|
CudaJitOptions |
setTarget(CudaJitTarget target)
Specifies the desired compute target.
|
CudaJitOptions |
setTargetFromCuContext()
Specifies that the target should be determined based on the current
attached context.
|
CudaJitOptions |
setThreadsPerBlock(int limit)
Specifies the minimum number of threads per block for compilation.
|
protected CudaJitOptions clone()
clone
in class java.lang.Object
public java.lang.String getErrorLogBuffer()
The result will be empty unless setErrorLogBufferSize(int)
was called with a positive value, this object was used in connection
with a CudaModule
or a CudaLinker
, and errors were
reported.
public java.lang.String getInfoLogBuffer()
The result will be empty unless setInfoLogBufferSize(int)
was called with a positive value, this object was used in connection
with a CudaModule
or a CudaLinker
, and informational
messages were reported.
public int getThreadsPerBlock()
The result will only be meaningful if setThreadsPerBlock(int)
was
called with a positive value, and this object was used in connection
with a CudaModule
or a CudaLinker
involving PTX code.
public float getWallTime()
Applies to: compiler and linker.
public CudaJitOptions recordWallTime()
Applies to: compiler and linker.
public CudaJitOptions setCacheMode(CudaJitOptions.CacheMode mode)
Applies to compiler only.
mode
- the desired caching behaviorpublic CudaJitOptions setErrorLogBufferSize(int size)
Applies to compiler and linker.
size
- the size, in bytes, of the error log bufferpublic CudaJitOptions setGenerateDebugInfo(boolean enabled)
Applies to compiler and linker.
enabled
- whether debug information should be generatedpublic CudaJitOptions setGenerateLineInfo(boolean enabled)
Applies to compiler only.
enabled
- whether line number information should be generatedpublic CudaJitOptions setInfoLogBufferSize(int size)
Applies to compiler and linker.
size
- the size, in bytes, of the information log bufferpublic CudaJitOptions setJitFallbackStrategy(CudaJitOptions.Fallback strategy)
Applies to: compiler only
strategy
- the desired fallback strategypublic CudaJitOptions setLogVerbose(boolean verbose)
Applies to: compiler and linker
verbose
- whether verbose log messages should be generatedpublic CudaJitOptions setMaxRegisters(int limit)
Applies to: compiler only
limit
- the maximum number of registers a thread may usepublic CudaJitOptions setOptimizationLevel(int level)
Applies to compiler only.
level
- the desired optimization levelpublic CudaJitOptions setTarget(CudaJitTarget target)
Cannot be combined with setThreadsPerBlock(int)
.
Applies to compiler and linker.
target
- the desired compute targetpublic CudaJitOptions setTargetFromCuContext()
Applies to compiler and linker.
public CudaJitOptions setThreadsPerBlock(int limit)
This restricts the resource utilization of the compiler (e.g. maximum registers) such that a block with the given number of threads should be able to launch based on register limitations. Note, this option does not currently take into account any other resource limitations, such as shared memory utilization.
Cannot be combined with setTarget(CudaJitTarget)
.
Applies to compiler only.
limit
- the desired minimum number of threads per blockEclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 2013, 2023 IBM Corp. and others.