thomasbrandon / mish-cuda

Mish Activation Function for PyTorch
MIT License
147 stars 67 forks source link

How to install this in windows? #11

Open NotFound1911 opened 3 years ago

NotFound1911 commented 3 years ago

Hello,how to install this in windows? I did not install successfully on windows.

thomasbrandon commented 3 years ago

I haven't used windows to build extensions so can't offer much advice. You'll need the Microsoft Visual Studio 2019 C/C++ compiler installed and in your path as well as ninja. Check this thread for a bit more information. Though this is untested so may not work.

SpongeBab commented 3 years ago

@NotFound1911 @thomasbrandon

I failed also...... I think it is unable to install on windows,maybe forever

nlem commented 3 years ago

This may not allow the software to run but at least is allows it to complete the install on Windows. In csrc/msh.h, we have the following:

#ifdef __CUDACC__ #include <cuda_runtime.h> #include <c10/util/Half.h> #define GLOBAL_INLINE __forceinline__ __host__ __device__ #else #include <cmath> #define GLOBAL_INLINE __inline__ #endif

As a result Visual C++ then defines GLOBAL_INLINE as inline. Changing it to the following allowed me to run the install

#ifdef __CUDACC__ #include <cuda_runtime.h> #include <c10/util/Half.h> #define GLOBAL_INLINE __forceinline__ __host__ __device__ #else #include <cmath> #define GLOBAL_INLINE inline #endif

vohungvi commented 1 year ago

Thanks nlem, your code fixed my issue. Now I success installed on Windows 10, CUDA 11.3 on RTX 2060

awsomespark commented 7 months ago

Thanks nlem, real hero!