Show / Hide Table of Contents

    Class DriverAPINativeMethods.Profiling

    This section describes the profiler control functions of the low-level CUDA driver application programming interface.

    Inheritance
    System.Object
    DriverAPINativeMethods.Profiling
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ManagedCuda
    Assembly: ManagedCuda.dll
    Syntax
    public static class Profiling

    Methods

    cuProfilerInitialize(String, String, CUoutputMode)

    Initialize the profiling.

    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 ErrorProfilerDisabled return code.

    Declaration
    public static CUResult cuProfilerInitialize(string configFile, string outputFile, CUoutputMode outputMode)
    Parameters
    Type Name Description
    System.String configFile

    Name of the config file that lists the counters/options for profiling.

    System.String outputFile

    Name of the outputFile where the profiling results will be stored.

    CUoutputMode outputMode

    outputMode

    Returns
    Type Description
    CUResult

    CUDA Error Codes: Success, ErrorProfilerDisabled, ErrorInvalidContext, ErrorInvalidValue.

    cuProfilerStart()

    Enable profiling.

    Enables profile collection by the active profiling tool for the current context. If profiling is already enabled, then cuProfilerStart() has no effect.

    cuProfilerStart and cuProfilerStop APIs are used to programmatically control the profiling granularity by allowing profiling to be done only on selective pieces of code.

    Declaration
    public static CUResult cuProfilerStart()
    Returns
    Type Description
    CUResult

    CUDA Error Codes: Success, ErrorInvalidContext.

    cuProfilerStop()

    Disables profile collection by the active profiling tool for the current context. If profiling is already disabled, then cuProfilerStop() has no effect.

    cuProfilerStart and cuProfilerStop APIs are used to programmatically control the profiling granularity by allowing profiling to be done only on selective pieces of code.

    Declaration
    public static CUResult cuProfilerStop()
    Returns
    Type Description
    CUResult

    CUDA Error Codes: Success, ErrorInvalidContext.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX