diff --git a/README.md b/README.md index 953c7c7..42d0b92 100644 --- a/README.md +++ b/README.md @@ -76,8 +76,8 @@ You should install most recent run-time an developer driver packages as outlined If you are building on Linux you must also symlink (or rename) the ZLUDA output binaries after ZLUDA build finishes: ``` ln -s libnvcuda.so target/release/libcuda.so -ln -s libcuda.so target/release/libcuda.so.1 -ln -s libnvidia-ml.so target/release/libnvml.so +ln -s libnvcuda.so target/release/libcuda.so.1 +ln -s libnvml.so target/release/libnvidia-ml.so ``` ## Contributing diff --git a/ptx/lib/zluda_ptx_impl.bc b/ptx/lib/zluda_ptx_impl.bc index e2f956d..2d194c4 100644 Binary files a/ptx/lib/zluda_ptx_impl.bc and b/ptx/lib/zluda_ptx_impl.bc differ diff --git a/ptx/lib/zluda_ptx_impl.cl b/ptx/lib/zluda_ptx_impl.cl index 0870fb5..86bb593 100644 --- a/ptx/lib/zluda_ptx_impl.cl +++ b/ptx/lib/zluda_ptx_impl.cl @@ -335,3 +335,10 @@ void FUNC(__assertfail)( __attribute__((unused)) __private ulong* charSize ) { } + +uint FUNC(vprintf)( + __attribute__((unused)) __generic void* format, + __attribute__((unused)) __generic void* valist +) { + return 0; +} diff --git a/ptx/src/translate.rs b/ptx/src/translate.rs index 66fae15..297588a 100644 --- a/ptx/src/translate.rs +++ b/ptx/src/translate.rs @@ -1163,9 +1163,11 @@ fn translate_function<'input, 'a>( ) -> Result>, TranslateError> { let import_as = match &f.func_directive { ast::MethodDeclaration { - name: ast::MethodName::Func("__assertfail"), + name: ast::MethodName::Func(func_name), .. - } => Some("__zluda_ptx_impl____assertfail".to_owned()), + } if *func_name == "__assertfail" || *func_name == "vprintf" => { + Some([ZLUDA_PTX_PREFIX, func_name].concat()) + } _ => None, }; let (str_resolver, fn_resolver, fn_decl) = id_defs.start_fn(&f.func_directive)?;