Skip to content

Commit 5f5e75b

Browse files
committed
remove bad form of error throwing on destructors. worst case we'll leak.
1 parent 2064d7e commit 5f5e75b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/arraymancer/tensor/backend/cuda.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ type
9090

9191
proc `=destroy`*(p: CudaLayoutArrayObj) {.noSideEffect.}=
9292
if not p.value.isNil:
93-
check cudaFree(p.value)
93+
discard cudaFree(p.value)
9494

9595
proc layoutOnDevice*[T:SomeFloat](t: CudaTensor[T]): CudaTensorLayout[T] {.noSideEffect.}=
9696
## Store a CudaTensor shape, strides, etc information on the GPU

src/arraymancer/tensor/data_structure.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import
1616
../laser/dynamic_stack_arrays,
1717
../laser/tensor/datatypes,
1818
nimblas,
19-
nimcuda/cuda12_5/[cuda_runtime_api, check],
19+
nimcuda/cuda12_5/[cuda_runtime_api],
2020
# Standard library
2121
std/[complex]
2222

@@ -81,7 +81,7 @@ type
8181

8282
proc `=destroy`*[T](p: CudaTensorRefTrackerObj[T]) {.noSideEffect.}=
8383
if not p.value.isNil:
84-
check cudaFree(p.value)
84+
discard cudaFree(p.value)
8585

8686

8787

0 commit comments

Comments
 (0)