From 010221ea1801dba13f39b9f02b66b7443fa5e58d Mon Sep 17 00:00:00 2001 From: yuchao Date: Tue, 28 May 2019 17:00:35 +0800 Subject: [PATCH] fix ptx parser bug when CUDART_VERSION < 6000 --- src/cuda-sim/ptx_parser.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cuda-sim/ptx_parser.cc b/src/cuda-sim/ptx_parser.cc index 25758dd85..c87b6c628 100644 --- a/src/cuda-sim/ptx_parser.cc +++ b/src/cuda-sim/ptx_parser.cc @@ -172,9 +172,11 @@ symbol_table *init_parser( const char *ptx_filename ) init_directive_state(); init_instruction_state(); +#if (CUDART_VERSION >= 6000) ptx_in = fopen(ptx_filename, "r"); ptx_parse(); fclose(ptx_in); +#endif return g_global_symbol_table; }