public class CUDAProfiler
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CUDAProfiler.Functions
Contains the function pointers loaded from
CU.getLibrary(). |
| Modifier and Type | Field and Description |
|---|---|
static int |
CU_OUT_CSV
Profiler Output Modes.
|
static int |
CU_OUT_KEY_VALUE_PAIR
Profiler Output Modes.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
cuProfilerInitialize(java.nio.ByteBuffer configFile,
java.nio.ByteBuffer outputFile,
int outputMode)
Initialize the profiling.
|
static int |
cuProfilerInitialize(java.lang.CharSequence configFile,
java.lang.CharSequence outputFile,
int outputMode)
Initialize the profiling.
|
static int |
cuProfilerStart()
Enable profiling.
|
static int |
cuProfilerStop()
Disable profiling.
|
static int |
ncuProfilerInitialize(long configFile,
long outputFile,
int outputMode)
Unsafe version of:
ProfilerInitialize |
public static final int CU_OUT_KEY_VALUE_PAIR
CUoutput_mode
OUT_KEY_VALUE_PAIR - Output mode Key-Value pair format.OUT_CSV - Output mode Comma separated values format.public static final int CU_OUT_CSV
CUoutput_mode
OUT_KEY_VALUE_PAIR - Output mode Key-Value pair format.OUT_CSV - Output mode Comma separated values format.public static int ncuProfilerInitialize(long configFile,
long outputFile,
int outputMode)
ProfilerInitializepublic static int cuProfilerInitialize(java.nio.ByteBuffer configFile,
java.nio.ByteBuffer outputFile,
int outputMode)
Using this API user can initialize the CUDA profiler by specifying the configuration file, output file and output file format. This API is generally
used to profile different set of counters by looping the kernel launch. The configFile parameter can be used to select profiling options
including profiler counters. Refer to the "Compute Command Line Profiler User Guide" for supported profiler options and counters.
Limitation: The CUDA profiler cannot be initialized with this API if another profiling tool is already active, as indicated by the
CU.CUDA_ERROR_PROFILER_DISABLED return code.
Typical usage of the profiling APIs is as follows:
for each set of counters/options
{
cuProfilerInitialize(); //Initialize profiling, set the counters or options in the config file
...
cuProfilerStart();
// code to be profiled
cuProfilerStop();
...
cuProfilerStart();
// code to be profiled
cuProfilerStop();
...
}configFile - name of the config file that lists the counters/options for profilingoutputFile - name of the outputFile where the profiling results will be storedoutputMode - one of:OUT_KEY_VALUE_PAIR | OUT_CSV |
public static int cuProfilerInitialize(java.lang.CharSequence configFile,
java.lang.CharSequence outputFile,
int outputMode)
Using this API user can initialize the CUDA profiler by specifying the configuration file, output file and output file format. This API is generally
used to profile different set of counters by looping the kernel launch. The configFile parameter can be used to select profiling options
including profiler counters. Refer to the "Compute Command Line Profiler User Guide" for supported profiler options and counters.
Limitation: The CUDA profiler cannot be initialized with this API if another profiling tool is already active, as indicated by the
CU.CUDA_ERROR_PROFILER_DISABLED return code.
Typical usage of the profiling APIs is as follows:
for each set of counters/options
{
cuProfilerInitialize(); //Initialize profiling, set the counters or options in the config file
...
cuProfilerStart();
// code to be profiled
cuProfilerStop();
...
cuProfilerStart();
// code to be profiled
cuProfilerStop();
...
}configFile - name of the config file that lists the counters/options for profilingoutputFile - name of the outputFile where the profiling results will be storedoutputMode - one of:OUT_KEY_VALUE_PAIR | OUT_CSV |
public static int cuProfilerStart()
Enables profile collection by the active profiling tool for the current context. If profiling is already enabled, then cuProfilerStart() has no
effect.
cuProfilerStart and ProfilerStop APIs are used to programmatically control the profiling granularity by allowing profiling to be done only
on selective pieces of code.
public static int cuProfilerStop()
Disables profile collection by the active profiling tool for the current context. If profiling is already disabled, then cuProfilerStop() has
no effect.
ProfilerStart and cuProfilerStop APIs are used to programmatically control the profiling granularity by allowing profiling to be done only
on selective pieces of code.
Copyright LWJGL. All Rights Reserved. License terms.