polish link problem

This commit is contained in:
Dun Liang 2021-09-27 12:12:08 +08:00
parent c1ee6d9ed3
commit ec80112709
2 changed files with 5 additions and 4 deletions

View File

@ -77,7 +77,7 @@ def install_mkl(root_folder):
sys.path.append(bin_path)
os.add_dll_directory(bin_path)
os.environ["PATH"] = os.environ.get("PATH", "") + ";" + bin_path
cmd = f"cd /d {dirname}/examples && {cc_path} {dirname}/examples/cnn_inference_f32.cpp -I{dirname}/include -Fe: {dirname}/examples/test {cc_flags} {win_link_flags} {dirname}/lib/mkldnn.lib"
cmd = f"cd /d {dirname}/examples && {cc_path} {dirname}/examples/cnn_inference_f32.cpp -I{dirname}/include -Fe: {dirname}/examples/test {fix_cl_flags(cc_flags)} {dirname}/lib/mkldnn.lib"
assert 0 == os.system(cmd)
assert 0 == os.system(f"{dirname}/examples/test")
@ -276,8 +276,10 @@ def setup_cuda_lib(lib_name, link=True, extra_flags=""):
ctypes.CDLL(ex_cudnn_path, dlopen_flags)
# dynamic link cuda library
ctypes.CDLL(culib_path, dlopen_flags)
link_flags = f"-l{lib_name} -L\"{cuda_lib}\""
# ctypes.CDLL(culib_path, dlopen_flags)
# link_flags = f"-l{lib_name} -L\"{cuda_lib}\""
link_flags = f"-l{lib_name} -L\"{os.path.dirname(culib_path)}\""
# print("link_flags", link_flags, culib_path)
# find all source files
culib_src_dir = os.path.join(jittor_path, "extern", "cuda", lib_name)

View File

@ -139,7 +139,6 @@ void breakpoint() {
}
void print_trace() {
LOGir << "???" << gdb_path;
if (gdb_path.size()) {
// using gdb to print the stack trace
char pid_buf[30];