Skip to content

Commit

Permalink
faking the PyInit_ function so that Windows linker works
Browse files Browse the repository at this point in the history
  • Loading branch information
stefdoerr committed Jan 22, 2025
1 parent f0ee58b commit 8a8b42f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions torchmdnet/extensions/torchmdnet_extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
#include <cuda_runtime_api.h>
#endif

#ifdef _WIN32
#define EXTENSION_API __declspec(dllexport)
#else
#define EXTENSION_API
#endif

extern "C" EXTENSION_API PyObject* PyInit_torchmdnet_extensions(void) {
return NULL;
}

/* @brief Returns true if the current torch CUDA stream is capturing.
* This function is required because the one available in torch is not compatible with TorchScript.
* @return True if the current torch CUDA stream is capturing.
Expand Down

0 comments on commit 8a8b42f

Please sign in to comment.