Skip to content

Commit 19ade18

Browse files
committed
Fix: initial error of dngvd on DCU
1 parent e9e91d7 commit 19ade18

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

source/module_hsolver/kernels/rocm/dngvd_op.hip.cu

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,18 @@ namespace hsolver {
1010
static hipsolverHandle_t hipsolver_H = nullptr;
1111

1212
void createGpuSolverHandle() {
13-
return;
13+
if (hipsolver_H == nullptr)
14+
{
15+
hipsolverErrcheck(hipsolverCreate(&hipsolver_H));
16+
}
1417
}
1518

1619
void destroyGpuSolverHandle() {
17-
return;
20+
if (hipsolver_H != nullptr)
21+
{
22+
hipsolverErrcheck(hipsolverDestroy(hipsolver_H));
23+
hipsolver_H = nullptr;
24+
}
1825
}
1926

2027
const int N_DCU=234;

0 commit comments

Comments
 (0)