Skip to content

GPU timing functions #5

@jrcccc

Description

@jrcccc

Just a suggestion on how to implement GPU kernel timing functions using Events:

cuda Event_t startTime, stopTime;
float timeInMs;
cudaEventCreate(&startTime);
cudaEventCreate(&stopTime);

And before / after every kernel launch:

cudaEventRecord(startTime);
launch_kernel<<<blablabla>>>(...);
cudaEventRecord(stopTime);


cudaEventSynchronize(stopTime);

cudaEventElapsedTime(&timeInMs, startTime, stopTime);

And of course equivalent hip functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions