Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8889ee0

Browse filesBrowse files
willybornumar456
authored andcommitted
Fixed initialization error on gebrd
1 parent 11af307 commit 8889ee0
Copy full SHA for 8889ee0

File tree

Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed

‎src/backend/opencl/magma/gebrd.cpp

Copy file name to clipboardExpand all lines: src/backend/opencl/magma/gebrd.cpp
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,17 @@ magma_int_t magma_gebrd_hybrid(magma_int_t m, magma_int_t n, Ty *a,
239239
return *info;
240240
}
241241

242-
if (MAGMA_SUCCESS != magma_malloc<Ty>(&dwork, (m + n) * nb)) {
242+
const size_t size = (m + n) * nb;
243+
if (MAGMA_SUCCESS != magma_malloc<Ty>(&dwork, size)) {
243244
*info = MAGMA_ERR_DEVICE_ALLOC;
244245
return *info;
245246
}
246247
size_t dwork_offset = 0;
248+
// initialize dwork to 0.0
249+
const float dfill = 0.0;
250+
cl_int err = clEnqueueFillBuffer(queue, dwork, &dfill, sizeof(dfill), 0,
251+
size * sizeof(Ty), 0, nullptr, nullptr);
252+
check_error(err);
247253

248254
cl_event event = 0;
249255

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.