@@ -963,7 +963,8 @@ cdef class CommonData:
963
963
964
964
cdef extern from " cccl/c/reduce.h" :
965
965
cdef struct cccl_device_reduce_build_result_t ' cccl_device_reduce_build_result_t' :
966
- pass
966
+ const char * cubin
967
+ size_t cubin_size
967
968
968
969
cdef CUresult cccl_device_reduce_build(
969
970
cccl_device_reduce_build_result_t* ,
@@ -1071,6 +1072,8 @@ cdef class DeviceReduceBuildResult:
1071
1072
)
1072
1073
return storage_sz
1073
1074
1075
+ def _get_cubin (self ):
1076
+ return self .build_data.cubin[:self .build_data.cubin_size]
1074
1077
1075
1078
# ------------
1076
1079
# DeviceScan
@@ -1081,7 +1084,8 @@ cdef extern from "cccl/c/scan.h":
1081
1084
ctypedef bint _Bool
1082
1085
1083
1086
cdef struct cccl_device_scan_build_result_t ' cccl_device_scan_build_result_t' :
1084
- pass
1087
+ const char * cubin
1088
+ size_t cubin_size
1085
1089
1086
1090
cdef CUresult cccl_device_scan_build(
1087
1091
cccl_device_scan_build_result_t* ,
@@ -1236,6 +1240,8 @@ cdef class DeviceScanBuildResult:
1236
1240
)
1237
1241
return storage_sz
1238
1242
1243
+ def _get_cubin (self ):
1244
+ return self .build_data.cubin[:self .build_data.cubin_size]
1239
1245
1240
1246
# -----------------------
1241
1247
# DeviceSegmentedReduce
@@ -1244,7 +1250,8 @@ cdef class DeviceScanBuildResult:
1244
1250
1245
1251
cdef extern from " cccl/c/segmented_reduce.h" :
1246
1252
cdef struct cccl_device_segmented_reduce_build_result_t ' cccl_device_segmented_reduce_build_result_t' :
1247
- pass
1253
+ const char * cubin
1254
+ size_t cubin_size
1248
1255
1249
1256
cdef CUresult cccl_device_segmented_reduce_build(
1250
1257
cccl_device_segmented_reduce_build_result_t* ,
@@ -1364,14 +1371,17 @@ cdef class DeviceSegmentedReduceBuildResult:
1364
1371
)
1365
1372
return storage_sz
1366
1373
1374
+ def _get_cubin (self ):
1375
+ return self .build_data.cubin[:self .build_data.cubin_size]
1367
1376
# -----------------
1368
1377
# DeviceMergeSort
1369
1378
# -----------------
1370
1379
1371
1380
1372
1381
cdef extern from " cccl/c/merge_sort.h" :
1373
1382
cdef struct cccl_device_merge_sort_build_result_t ' cccl_device_merge_sort_build_result_t' :
1374
- pass
1383
+ const char * cubin
1384
+ size_t cubin_size
1375
1385
1376
1386
cdef CUresult cccl_device_merge_sort_build(
1377
1387
cccl_device_merge_sort_build_result_t * bld_ptr,
@@ -1484,13 +1494,20 @@ cdef class DeviceMergeSortBuildResult:
1484
1494
)
1485
1495
return storage_sz
1486
1496
1497
+
1498
+ def _get_cubin (self ):
1499
+ return self .build_data.cubin[:self .build_data.cubin_size]
1500
+
1501
+
1487
1502
# -------------------
1488
1503
# DeviceUniqueByKey
1489
1504
# -------------------
1490
1505
1491
1506
cdef extern from " cccl/c/unique_by_key.h" :
1492
1507
cdef struct cccl_device_unique_by_key_build_result_t ' cccl_device_unique_by_key_build_result_t' :
1493
- pass
1508
+ const char * cubin
1509
+ size_t cubin_size
1510
+
1494
1511
1495
1512
cdef CUresult cccl_device_unique_by_key_build(
1496
1513
cccl_device_unique_by_key_build_result_t * build_ptr,
@@ -1611,12 +1628,16 @@ cdef class DeviceUniqueByKeyBuildResult:
1611
1628
return storage_sz
1612
1629
1613
1630
1631
+ def _get_cubin (self ):
1632
+ return self .build_data.cubin[:self .build_data.cubin_size]
1633
+
1614
1634
# --------------------------------------------
1615
1635
# DeviceUnaryTransform/DeviceBinaryTransform
1616
1636
# --------------------------------------------
1617
1637
cdef extern from " cccl/c/transform.h" :
1618
1638
cdef struct cccl_device_transform_build_result_t:
1619
- pass
1639
+ const char * cubin
1640
+ size_t cubin_size
1620
1641
1621
1642
cdef CUresult cccl_device_unary_transform_build(
1622
1643
cccl_device_transform_build_result_t * build_ptr,
@@ -1723,6 +1744,10 @@ cdef class DeviceUnaryTransform:
1723
1744
raise RuntimeError (" Failed to compute unary transform" )
1724
1745
1725
1746
1747
+ def _get_cubin (self ):
1748
+ return self .build_data.cubin[:self .build_data.cubin_size]
1749
+
1750
+
1726
1751
cdef class DeviceBinaryTransform:
1727
1752
cdef cccl_device_transform_build_result_t build_data
1728
1753
@@ -1791,3 +1816,6 @@ cdef class DeviceBinaryTransform:
1791
1816
)
1792
1817
if (status != 0 ):
1793
1818
raise RuntimeError (" Failed to compute binary transform" )
1819
+
1820
+ def _get_cubin (self ):
1821
+ return self .build_data.cubin[:self .build_data.cubin_size]
0 commit comments