Comments (5)
I now can setup a Windows box for testing. Although the issue you mentioned above related to linking issue, it can be fixed by wiring up with absolute path at lib.go
file, the compilation still blocked with unsolved issue __assert_fail...
. It turns out: Pytorch has not supported MinGW64 GCC at this time while Golang CGO only support MinGW on Window for GCC. So 2 issues to follow up:
- Pytorch: pytorch/pytorch#42589
- GO: golang/go#20982
Temporary solution for Windows users would be using WSL2 and install a Linux distribution. If you like your Windows system and have Visual Code installed on your Windows, the following steps might help:
- Install WSL2 (https://docs.microsoft.com/en-us/windows/wsl/install)
- Install Ubuntu on WSL2 (https://www.microsoft.com/en-gb/p/ubuntu-2004-lts/9n6svws3rx71)
- Setup visual code for accessing WSL2 (https://code.visualstudio.com/docs/remote/wsl)
- Setup Go (install Go on Ubuntu side and set GOPATH environment)
- Install tools: sudo apt install build-essential clang
- Setup CC to use clang: export CC = clang export CXX = clang++ to fix undefined reference to mkl... at
.bashrc
(Ubuntu side) - Setup
gotch
for linux as inREADME.md
file.
Hope that helps.
from gotch.
@Kur-Ich ,
We haven't got a setup instruction for Windows yet!
There's different libtorch
for Windows. You can download from Pytorch site:
and unzip to your system. Then setup environment:
- Temporary: in your console/shell window
$Env:GOTCH_LIBTORCH = "PATH_TO_YOUR_INSTALLED_LIBTORCH"
$Env:Path += ";PATH_TO_YOUR_INSTALL_LIBTORCH/lib"
- System-wide: set environment at
Control Panel -> System -> Advanced -> Environment Variables
Hope that helps.
from gotch.
Thanks. I've added both but I'm still getting the same error unfortunately. Is anything else needed, such as building the C++ lib with CMake?
from gotch.
Thanks. I've added both but I'm still getting the same error unfortunately. Is anything else needed, such as building the C++ lib with CMake?
I have the same problem on windows
from gotch.
@sugarme thank you, thank you. I've turned to archlinux.
from gotch.
Related Issues (20)
- v2.0 support HOT 3
- Possible Memory Leak From C.malloc(0) HOT 3
- how to load model pytorch_model.bin HOT 5
- Indexing documentation HOT 1
- Can't build project with gotch v0.9.0 HOT 3
- Production use for gotch just for inference HOT 3
- Concurrency issue in generating tensor name in newTensor HOT 3
- Can memory leak in tensor-generated.go because of malloc(0) ? HOT 8
- Memory Leak in JIT Model under Multi-Goroutine Environment HOT 9
- how can i convert gocv.Mat image data to Tensor ? HOT 2
- `*ts.CModule` does not implement `ts.Module` interface correctly
- Cannot Run the Application with Cgo HOT 1
- Cannot Run the Application using Libtorch 2.1 (CPU) Docker Image
- Consider using build tags instead of a bash script HOT 6
- TestOptimizer is flaky
- install steps on macos HOT 3
- error while reading libtch HOT 4
- Q) Is there a function or method to clear the cached memory? HOT 1
- Float64Values() shows an error 'Unsupported Go type: []float64' HOT 2
- Releasing tensor causes segmentation fault error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotch.