Skip to content
This repository was archived by the owner on Mar 29, 2025. It is now read-only.

Commit d6e1304

Browse files
authored
Merge pull request #22 from rust-cuda/cuda-profiler
Add binding to cudaProfiler.h
2 parents 015242d + 3aaac22 commit d6e1304

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

cuda-driver-sys/src/cuda.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6834,6 +6834,26 @@ extern "C" {
68346834
}
68356835
#[repr(u32)]
68366836
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
6837+
pub enum CUoutput_mode_enum {
6838+
CU_OUT_KEY_VALUE_PAIR = 0,
6839+
CU_OUT_CSV = 1,
6840+
}
6841+
pub use self::CUoutput_mode_enum as CUoutput_mode;
6842+
extern "C" {
6843+
pub fn cuProfilerInitialize(
6844+
configFile: *const ::std::os::raw::c_char,
6845+
outputFile: *const ::std::os::raw::c_char,
6846+
outputMode: CUoutput_mode,
6847+
) -> CUresult;
6848+
}
6849+
extern "C" {
6850+
pub fn cuProfilerStart() -> CUresult;
6851+
}
6852+
extern "C" {
6853+
pub fn cuProfilerStop() -> CUresult;
6854+
}
6855+
#[repr(u32)]
6856+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
68376857
pub enum cudaDataType_t {
68386858
CUDA_R_16F = 2,
68396859
CUDA_C_16F = 6,

cuda-driver-sys/wrapper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cuComplex.h"
22
#include "cuda.h"
3+
#include "cudaProfiler.h"
34
#include "library_types.h"
45
#include "vector_types.h"

0 commit comments

Comments
 (0)