@@ -1366,12 +1366,7 @@ pi_result cuda_piextDeviceGetNativeHandle(pi_device device,
1366
1366
1367
1367
// / Created a PI device object from a CUDA device handle.
1368
1368
// / TODO: Implement this.
1369
- // / NOTE: Approaches for native object lifetime:
1370
- // / 1. Make the created PI object the owner of the native object,
1371
- // / deleting it upon its own destruction.
1372
- // / 2. Make a special-case where the PI object does not destroy the
1373
- // / native object.
1374
- // / Both options may make lifetime tracking difficult for the user.
1369
+ // / NOTE: The created PI object takes ownership of the native handle.
1375
1370
// /
1376
1371
// / \param[in] nativeHandle The native handle to create PI device object from.
1377
1372
// / \param[out] device Set to the PI device object created from native handle.
@@ -1533,12 +1528,7 @@ pi_result cuda_piextContextGetNativeHandle(pi_context context,
1533
1528
1534
1529
// / Created a PI context object from a CUDA context handle.
1535
1530
// / TODO: Implement this.
1536
- // / NOTE: Approaches for native object lifetime:
1537
- // / 1. Make the created PI object the owner of the native object,
1538
- // / deleting it upon its own destruction.
1539
- // / 2. Make a special-case where the PI object does not destroy the
1540
- // / native object.
1541
- // / Both options may make lifetime tracking difficult for the user.
1531
+ // / NOTE: The created PI object takes ownership of the native handle.
1542
1532
// /
1543
1533
// / \param[in] nativeHandle The native handle to create PI context object from.
1544
1534
// / \param[out] context Set to the PI context object created from native handle.
@@ -1747,12 +1737,7 @@ pi_result cuda_piextMemGetNativeHandle(pi_mem mem,
1747
1737
1748
1738
// / Created a PI mem object from a CUDA mem handle.
1749
1739
// / TODO: Implement this.
1750
- // / NOTE: Approaches for native object lifetime:
1751
- // / 1. Make the created PI object the owner of the native object,
1752
- // / deleting it upon its own destruction.
1753
- // / 2. Make a special-case where the PI object does not destroy the
1754
- // / native object.
1755
- // / Both options may make lifetime tracking difficult for the user.
1740
+ // / NOTE: The created PI object takes ownership of the native handle.
1756
1741
// /
1757
1742
// / \param[in] nativeHandle The native handle to create PI mem object from.
1758
1743
// / \param[out] mem Set to the PI mem object created from native handle.
@@ -1914,12 +1899,7 @@ pi_result cuda_piextQueueGetNativeHandle(pi_queue queue,
1914
1899
1915
1900
// / Created a PI queue object from a CUDA queue handle.
1916
1901
// / TODO: Implement this.
1917
- // / NOTE: Approaches for native object lifetime:
1918
- // / 1. Make the created PI object the owner of the native object,
1919
- // / deleting it upon its own destruction.
1920
- // / 2. Make a special-case where the PI object does not destroy the
1921
- // / native object.
1922
- // / Both options may make lifetime tracking difficult for the user.
1902
+ // / NOTE: The created PI object takes ownership of the native handle.
1923
1903
// /
1924
1904
// / \param[in] nativeHandle The native handle to create PI queue object from.
1925
1905
// / \param[out] queue Set to the PI queue object created from native handle.
@@ -2533,12 +2513,7 @@ pi_result cuda_piextProgramGetNativeHandle(pi_program program,
2533
2513
2534
2514
// / Created a PI program object from a CUDA program handle.
2535
2515
// / TODO: Implement this.
2536
- // / NOTE: Approaches for native object lifetime:
2537
- // / 1. Make the created PI object the owner of the native object,
2538
- // / deleting it upon its own destruction.
2539
- // / 2. Make a special-case where the PI object does not destroy the
2540
- // / native object.
2541
- // / Both options may make lifetime tracking difficult for the user.
2516
+ // / NOTE: The created PI object takes ownership of the native handle.
2542
2517
// /
2543
2518
// / \param[in] nativeHandle The native handle to create PI program object from.
2544
2519
// / \param[out] program Set to the PI program object created from native handle.
@@ -2923,12 +2898,7 @@ pi_result cuda_piextEventGetNativeHandle(pi_event event,
2923
2898
2924
2899
// / Created a PI event object from a CUDA event handle.
2925
2900
// / TODO: Implement this.
2926
- // / NOTE: Approaches for native object lifetime:
2927
- // / 1. Make the created PI object the owner of the native object,
2928
- // / deleting it upon its own destruction.
2929
- // / 2. Make a special-case where the PI object does not destroy the
2930
- // / native object.
2931
- // / Both options may make lifetime tracking difficult for the user.
2901
+ // / NOTE: The created PI object takes ownership of the native handle.
2932
2902
// /
2933
2903
// / \param[in] nativeHandle The native handle to create PI event object from.
2934
2904
// / \param[out] event Set to the PI event object created from native handle.
0 commit comments