Skip to content

Commit 18b61c0

Browse files
authored
[src] add compile guards in case cuda is not configured (#3924)
1 parent ad73548 commit 18b61c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

18+
#if HAVE_CUDA == 1
1819
#include <cuda_profiler_api.h>
20+
#endif
21+
1922
#include <string>
2023
#include <vector>
2124

@@ -367,7 +370,9 @@ int main(int argc, char *argv[]) {
367370
cudaHostUnregister(h_batch_feats_out.Data());
368371

369372
cudaDeviceSynchronize();
373+
#if HAVE_CUDA == 1
370374
cudaProfilerStop();
375+
#endif
371376

372377
return 0;
373378
} catch (const std::exception &e) {

0 commit comments

Comments
 (0)