question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows NNVM Module export_library error

See original GitHub issue
Traceback (most recent call last):
  File "deploy_ssd_tvm.py", line 40, in <module>
    lib.export_library("./deployed_model/deploy_lib.dll", fcompile=False)
  File "C:\Users\*****\AppData\Roaming\Python\Python37\site-packages\tvm-0.5.dev0-py3.7-win-amd64.egg\tvm\module.py", line 128, in export_library
    fcompile(file_name, files, **kwargs)
  File "C:\Users\*****\AppData\Roaming\Python\Python37\site-packages\tvm-0.5.dev0-py3.7-win-amd64.egg\tvm\contrib\cc.py", line 35, in create_shared
    _windows_shared(output, objects, options)
  File "C:\Users\*****\AppData\Roaming\Python\Python37\site-packages\tvm-0.5.dev0-py3.7-win-amd64.egg\tvm\contrib\cc.py", line 120, in _windows_shared
    raise RuntimeError(msg)
RuntimeError: Compilation error:
Microsoft (R) Incremental Linker Version 14.16.27026.1
Copyright (C) Microsoft Corporation.  All rights reserved.

lib.o : fatal error LNK1143: invalid or corrupt file: no symbol for COMDAT section 0x5

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
mnbooscommented, Feb 22, 2019

It worked for me after patching TVM with the patch I showed above. After some testing I reduced it to the following:

diff --git a/python/tvm/contrib/cc.py b/python/tvm/contrib/cc.py
index 0ffa6c42..906bf4cc 100644
--- a/python/tvm/contrib/cc.py
+++ b/python/tvm/contrib/cc.py
@@ -91,7 +91,7 @@ BOOL APIENTRY DllMain( HMODULE hModule,\
         msg = "Compilation error:\n"
         msg += py_str(out)
         raise RuntimeError(msg)
-    link_cmd = ["link"]
+    link_cmd = ["lld-link"]
     link_cmd += ["-dll", "-FORCE:MULTIPLE"]

     for obj in objects:

Then apply it:

set PATH=%path%;C:\Program Files\Git\bin
bash.exe -c 'patch -p1 ~/AppData/Roaming/Python/Python37/site-packages/tvm-0.5.dev0-py3.7-win-amd64.egg/tvm/contrib/cc.py cc.py.patch'

Notes:

  1. You must build LLD with LLVM
  2. The directory of the built binaries (like lld-link.exe) must added to the path variables (or change to patch to include the full path to lld-link)
0reactions
chinakookcommented, Mar 2, 2019

LGTM.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows NNVM Module export_library error #2450 - GitHub
I was able to export the library. I'm not 100% sure I correctly understand what happened. As far as I know, it's a...
Read more >
Windows NNVM Module export_library error - Questions
We can compile the graph on Linux using “lib.export_library(”./deployed_model/deploy_lib.so", fcompile=False)", but get link error on Windows.
Read more >
Error 0x80070005 when you export VM over Network
This article provides a solution to an issue where the error 0x80070005 occurs when you export a virtual machine to a network share....
Read more >
packages by category | Hackage - Haskell.org
hyraxAbif library, program and test: Modules for parsing, generating and manipulating AB1 files. integreat library and program: Integrate different assays.
Read more >
Why Is This Cuda Kernel Slow - ADocLib
In short my issue is: super slow performance with NVIDIA CUDA freeing GPU memory In detail: I've trained a transformer NLP classifier which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found