Skip to content

Commit aedcfce

Browse files
committed
CANN: add device default id
1 parent 76d24c3 commit aedcfce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ggml/src/ggml-cann/ggml-cann.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
* @param device The device ID to set.
7676
*/
7777
void ggml_cann_set_device(const int32_t device) {
78-
int current_device;
78+
int current_device = -1;
7979
aclrtGetDevice(&current_device);
8080

8181
if (device == current_device) {
@@ -1728,6 +1728,7 @@ static bool ggml_cann_compute_forward(ggml_backend_cann_context& ctx,
17281728
ggml_cann_get_rows(ctx, dst);
17291729
break;
17301730
case GGML_OP_SET_ROWS:
1731+
std::cout << "lcg GGML_OP_SET_ROWS"<< std::endl;
17311732
ggml_cann_set_rows(ctx, dst);
17321733
break;
17331734
case GGML_OP_DUP:

0 commit comments

Comments
 (0)