Skip to content

Commit a5c6ea4

Browse files
authored
[Metax] Assign data stream to CUDA (#2173)
1 parent 9216481 commit a5c6ea4

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/_Metax-X86.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878

7979
run: |
8080
cd backends/metax_gpu/tests
81-
bash run_test.sh -j 8
81+
bash run_test.sh -j 32
8282
8383
- name: push whl
8484
env:

.github/workflows/_Metax_work_private.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
run: |
8181
cd backends/metax_gpu/tests
82-
bash run_test.sh -j 8
82+
bash run_test.sh -j 32
8383
8484
- name: push whl
8585
env:

backends/metax_gpu/runtime/runtime.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,8 @@ C_Status AsyncMemCpyH2D(const C_Device device,
579579
return C_ERROR;
580580
}
581581

582-
cudaErr = cudaMemcpyAsync(dst, src, size, cudaMemcpyHostToDevice);
582+
cudaErr = cudaMemcpyAsync(
583+
dst, src, size, cudaMemcpyHostToDevice, (cudaStream_t)stream);
583584
if (cudaErr != cudaSuccess) {
584585
return C_ERROR;
585586
}
@@ -605,7 +606,8 @@ C_Status AsyncMemCpyD2H(const C_Device device,
605606
return C_ERROR;
606607
}
607608

608-
cudaErr = cudaMemcpyAsync(dst, src, size, cudaMemcpyDeviceToHost);
609+
cudaErr = cudaMemcpyAsync(
610+
dst, src, size, cudaMemcpyDeviceToHost, (cudaStream_t)stream);
609611
if (cudaErr != cudaSuccess) {
610612
return C_ERROR;
611613
}
@@ -633,7 +635,8 @@ C_Status AsyncMemCpyD2D(const C_Device device,
633635
return C_ERROR;
634636
}
635637

636-
cudaErr = cudaMemcpyAsync(dst, src, size, cudaMemcpyDeviceToDevice);
638+
cudaErr = cudaMemcpyAsync(
639+
dst, src, size, cudaMemcpyDeviceToDevice, (cudaStream_t)stream);
637640
if (cudaErr != cudaSuccess) {
638641
return C_ERROR;
639642
}

0 commit comments

Comments
 (0)