Skip to content

Commit 24e9cfa

Browse files
authored
[src] Enable compilation (->runtime failure) with CUDA < 10.0 for CUDA batched feats (#3903)
1 parent f55bc9a commit 24e9cfa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cudafeatbin/compute-online-feats-batched-cuda.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ int main(int argc, char *argv[]) {
288288
Timer timer;
289289

290290
size_t free_byte, total_byte;
291-
cudaMemGetInfo( &free_byte, &total_byte );
291+
cudaMemGetInfo(&free_byte, &total_byte);
292292
double allocated = (total_byte - free_byte) / 1024 / 1024;
293293
// current pipeline
294294
int p = -1;
@@ -409,8 +409,11 @@ int main(int argc, char *argv[]) {
409409
}
410410

411411
// enqueue copy slices callback
412+
#if CUDA_VERSION >= 10000
412413
cudaLaunchHostFunc(dtoh, CopySlicesCallback, (void *)&cb_state[p]);
413-
414+
#else
415+
KALDI_ERR << "Cuda 10.0 or newer required to run this binary";
416+
#endif
414417
// mark the end of this chunk
415418
cudaEventRecord(pipeline_events[p], dtoh);
416419

0 commit comments

Comments
 (0)