Skip to content

Commit a8de26c

Browse files
authored
* Add presets for the CUPTI module of CUDA (pull #1531)
1 parent 33a8133 commit a8de26c

File tree

78 files changed

+15322
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+15322
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
* Add presets for the CUPTI module of CUDA ([pull #1531](https://github.com/bytedeco/javacpp-presets/pull/1531))
23
* Add new `ClangMemoryMgmtExample` in samples for LLVM ([pull #1522](https://github.com/bytedeco/javacpp-presets/pull/1522))
34
* Enable `opencv_python3` module for `macosx-arm64` as well ([pull #1517](https://github.com/bytedeco/javacpp-presets/pull/1517))
45
* Introduce `macosx-arm64` builds for CPython ([pull #1511](https://github.com/bytedeco/javacpp-presets/pull/1511)), NumPy ([pull #1515](https://github.com/bytedeco/javacpp-presets/pull/1515)), SciPy ([pull #1516](https://github.com/bytedeco/javacpp-presets/pull/1516))
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
2+
3+
package org.bytedeco.cuda.cupti;
4+
5+
import java.nio.*;
6+
import org.bytedeco.javacpp.*;
7+
import org.bytedeco.javacpp.annotation.*;
8+
9+
import static org.bytedeco.javacpp.presets.javacpp.*;
10+
import org.bytedeco.cuda.cudart.*;
11+
import static org.bytedeco.cuda.global.cudart.*;
12+
13+
import static org.bytedeco.cuda.global.cupti.*;
14+
15+
16+
/**
17+
* \brief The base activity record.
18+
*
19+
* The activity API uses a CUpti_Activity as a generic representation
20+
* for any activity. The 'kind' field is used to determine the
21+
* specific activity kind, and from that the CUpti_Activity object can
22+
* be cast to the specific activity record type appropriate for that kind.
23+
*
24+
* Note that all activity record types are padded and aligned to
25+
* ensure that each member of the record is naturally aligned.
26+
*
27+
* @see CUpti_ActivityKind
28+
*/
29+
@Properties(inherit = org.bytedeco.cuda.presets.cupti.class)
30+
public class CUpti_Activity extends Pointer {
31+
static { Loader.load(); }
32+
/** Default native constructor. */
33+
public CUpti_Activity() { super((Pointer)null); allocate(); }
34+
/** Native array allocator. Access with {@link Pointer#position(long)}. */
35+
public CUpti_Activity(long size) { super((Pointer)null); allocateArray(size); }
36+
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
37+
public CUpti_Activity(Pointer p) { super(p); }
38+
private native void allocate();
39+
private native void allocateArray(long size);
40+
@Override public CUpti_Activity position(long position) {
41+
return (CUpti_Activity)super.position(position);
42+
}
43+
@Override public CUpti_Activity getPointer(long i) {
44+
return new CUpti_Activity((Pointer)this).offsetAddress(i);
45+
}
46+
47+
/**
48+
* The kind of this activity.
49+
*/
50+
public native @Cast("CUpti_ActivityKind") int kind(); public native CUpti_Activity kind(int setter);
51+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
2+
3+
package org.bytedeco.cuda.cupti;
4+
5+
import java.nio.*;
6+
import org.bytedeco.javacpp.*;
7+
import org.bytedeco.javacpp.annotation.*;
8+
9+
import static org.bytedeco.javacpp.presets.javacpp.*;
10+
import org.bytedeco.cuda.cudart.*;
11+
import static org.bytedeco.cuda.global.cudart.*;
12+
13+
import static org.bytedeco.cuda.global.cupti.*;
14+
15+
16+
/**
17+
* \brief The activity record for a driver or runtime API invocation.
18+
*
19+
* This activity record represents an invocation of a driver or
20+
* runtime API (CUPTI_ACTIVITY_KIND_DRIVER and
21+
* CUPTI_ACTIVITY_KIND_RUNTIME).
22+
*/
23+
@Properties(inherit = org.bytedeco.cuda.presets.cupti.class)
24+
public class CUpti_ActivityAPI extends Pointer {
25+
static { Loader.load(); }
26+
/** Default native constructor. */
27+
public CUpti_ActivityAPI() { super((Pointer)null); allocate(); }
28+
/** Native array allocator. Access with {@link Pointer#position(long)}. */
29+
public CUpti_ActivityAPI(long size) { super((Pointer)null); allocateArray(size); }
30+
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
31+
public CUpti_ActivityAPI(Pointer p) { super(p); }
32+
private native void allocate();
33+
private native void allocateArray(long size);
34+
@Override public CUpti_ActivityAPI position(long position) {
35+
return (CUpti_ActivityAPI)super.position(position);
36+
}
37+
@Override public CUpti_ActivityAPI getPointer(long i) {
38+
return new CUpti_ActivityAPI((Pointer)this).offsetAddress(i);
39+
}
40+
41+
/**
42+
* The activity record kind, must be CUPTI_ACTIVITY_KIND_DRIVER,
43+
* CUPTI_ACTIVITY_KIND_RUNTIME, or CUPTI_ACTIVITY_KIND_INTERNAL_LAUNCH_API.
44+
*/
45+
public native @Cast("CUpti_ActivityKind") int kind(); public native CUpti_ActivityAPI kind(int setter);
46+
47+
/**
48+
* The ID of the driver or runtime function.
49+
*/
50+
public native @Cast("CUpti_CallbackId") int cbid(); public native CUpti_ActivityAPI cbid(int setter);
51+
52+
/**
53+
* The start timestamp for the function, in ns. A value of 0 for
54+
* both the start and end timestamps indicates that timestamp
55+
* information could not be collected for the function.
56+
*/
57+
public native @Cast("uint64_t") long start(); public native CUpti_ActivityAPI start(long setter);
58+
59+
/**
60+
* The end timestamp for the function, in ns. A value of 0 for both
61+
* the start and end timestamps indicates that timestamp information
62+
* could not be collected for the function.
63+
*/
64+
public native @Cast("uint64_t") long end(); public native CUpti_ActivityAPI end(long setter);
65+
66+
/**
67+
* The ID of the process where the driver or runtime CUDA function
68+
* is executing.
69+
*/
70+
public native @Cast("uint32_t") int processId(); public native CUpti_ActivityAPI processId(int setter);
71+
72+
/**
73+
* The ID of the thread where the driver or runtime CUDA function is
74+
* executing.
75+
*/
76+
public native @Cast("uint32_t") int threadId(); public native CUpti_ActivityAPI threadId(int setter);
77+
78+
/**
79+
* The correlation ID of the driver or runtime CUDA function. Each
80+
* function invocation is assigned a unique correlation ID that is
81+
* identical to the correlation ID in the memcpy, memset, or kernel
82+
* activity record that is associated with this function.
83+
*/
84+
public native @Cast("uint32_t") int correlationId(); public native CUpti_ActivityAPI correlationId(int setter);
85+
86+
/**
87+
* The return value for the function. For a CUDA driver function
88+
* with will be a CUresult value, and for a CUDA runtime function
89+
* this will be a cudaError_t value.
90+
*/
91+
public native @Cast("uint32_t") int returnValue(); public native CUpti_ActivityAPI returnValue(int setter);
92+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
2+
3+
package org.bytedeco.cuda.cupti;
4+
5+
import java.nio.*;
6+
import org.bytedeco.javacpp.*;
7+
import org.bytedeco.javacpp.annotation.*;
8+
9+
import static org.bytedeco.javacpp.presets.javacpp.*;
10+
import org.bytedeco.cuda.cudart.*;
11+
import static org.bytedeco.cuda.global.cudart.*;
12+
13+
import static org.bytedeco.cuda.global.cupti.*;
14+
15+
16+
/**
17+
* \brief Device auto boost state structure
18+
*
19+
* This structure defines auto boost state for a device.
20+
* See function \ref cuptiGetAutoBoostState
21+
*/
22+
@Properties(inherit = org.bytedeco.cuda.presets.cupti.class)
23+
public class CUpti_ActivityAutoBoostState extends Pointer {
24+
static { Loader.load(); }
25+
/** Default native constructor. */
26+
public CUpti_ActivityAutoBoostState() { super((Pointer)null); allocate(); }
27+
/** Native array allocator. Access with {@link Pointer#position(long)}. */
28+
public CUpti_ActivityAutoBoostState(long size) { super((Pointer)null); allocateArray(size); }
29+
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
30+
public CUpti_ActivityAutoBoostState(Pointer p) { super(p); }
31+
private native void allocate();
32+
private native void allocateArray(long size);
33+
@Override public CUpti_ActivityAutoBoostState position(long position) {
34+
return (CUpti_ActivityAutoBoostState)super.position(position);
35+
}
36+
@Override public CUpti_ActivityAutoBoostState getPointer(long i) {
37+
return new CUpti_ActivityAutoBoostState((Pointer)this).offsetAddress(i);
38+
}
39+
40+
/**
41+
* Returned auto boost state. 1 is returned in case auto boost is enabled, 0
42+
* otherwise
43+
*/
44+
public native @Cast("uint32_t") int enabled(); public native CUpti_ActivityAutoBoostState enabled(int setter);
45+
46+
/**
47+
* Id of process that has set the current boost state. The value will be
48+
* CUPTI_AUTO_BOOST_INVALID_CLIENT_PID if the user does not have the
49+
* permission to query process ids or there is an error in querying the
50+
* process id.
51+
*/
52+
public native @Cast("uint32_t") int pid(); public native CUpti_ActivityAutoBoostState pid(int setter);
53+
54+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
2+
3+
package org.bytedeco.cuda.cupti;
4+
5+
import java.nio.*;
6+
import org.bytedeco.javacpp.*;
7+
import org.bytedeco.javacpp.annotation.*;
8+
9+
import static org.bytedeco.javacpp.presets.javacpp.*;
10+
import org.bytedeco.cuda.cudart.*;
11+
import static org.bytedeco.cuda.global.cudart.*;
12+
13+
import static org.bytedeco.cuda.global.cupti.*;
14+
15+
16+
/**
17+
* \brief The activity record for source level result
18+
* branch.
19+
*
20+
* This activity record the locations of the branches in the
21+
* source (CUPTI_ACTIVITY_KIND_BRANCH).
22+
*/
23+
@Properties(inherit = org.bytedeco.cuda.presets.cupti.class)
24+
public class CUpti_ActivityBranch2 extends Pointer {
25+
static { Loader.load(); }
26+
/** Default native constructor. */
27+
public CUpti_ActivityBranch2() { super((Pointer)null); allocate(); }
28+
/** Native array allocator. Access with {@link Pointer#position(long)}. */
29+
public CUpti_ActivityBranch2(long size) { super((Pointer)null); allocateArray(size); }
30+
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
31+
public CUpti_ActivityBranch2(Pointer p) { super(p); }
32+
private native void allocate();
33+
private native void allocateArray(long size);
34+
@Override public CUpti_ActivityBranch2 position(long position) {
35+
return (CUpti_ActivityBranch2)super.position(position);
36+
}
37+
@Override public CUpti_ActivityBranch2 getPointer(long i) {
38+
return new CUpti_ActivityBranch2((Pointer)this).offsetAddress(i);
39+
}
40+
41+
/**
42+
* The activity record kind, must be CUPTI_ACTIVITY_KIND_BRANCH.
43+
*/
44+
public native @Cast("CUpti_ActivityKind") int kind(); public native CUpti_ActivityBranch2 kind(int setter);
45+
46+
/**
47+
* The ID for source locator.
48+
*/
49+
public native @Cast("uint32_t") int sourceLocatorId(); public native CUpti_ActivityBranch2 sourceLocatorId(int setter);
50+
51+
/**
52+
* The correlation ID of the kernel to which this result is associated.
53+
*/
54+
public native @Cast("uint32_t") int correlationId(); public native CUpti_ActivityBranch2 correlationId(int setter);
55+
56+
/**
57+
* Correlation ID with global/device function name
58+
*/
59+
public native @Cast("uint32_t") int functionId(); public native CUpti_ActivityBranch2 functionId(int setter);
60+
61+
/**
62+
* The pc offset for the branch.
63+
*/
64+
public native @Cast("uint32_t") int pcOffset(); public native CUpti_ActivityBranch2 pcOffset(int setter);
65+
66+
/**
67+
* Number of times this branch diverged
68+
*/
69+
public native @Cast("uint32_t") int diverged(); public native CUpti_ActivityBranch2 diverged(int setter);
70+
71+
/**
72+
* This increments each time when this instruction is executed by number
73+
* of threads that executed this instruction
74+
*/
75+
public native @Cast("uint64_t") long threadsExecuted(); public native CUpti_ActivityBranch2 threadsExecuted(long setter);
76+
77+
/**
78+
* The number of times this instruction was executed per warp. It will be incremented
79+
* regardless of predicate or condition code.
80+
*/
81+
public native @Cast("uint32_t") int executed(); public native CUpti_ActivityBranch2 executed(int setter);
82+
83+
/**
84+
* Undefined. Reserved for internal use.
85+
*/
86+
public native @Cast("uint32_t") int pad(); public native CUpti_ActivityBranch2 pad(int setter);
87+
}

0 commit comments

Comments
 (0)