Git Product home page Git Product logo

Comments (2)

sugarme avatar sugarme commented on August 24, 2024

Hi @HaoboGu ,

What platform are you using to compile and intend to run on which platform?

To compile for running on linux Amd64, I do

CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build

To compile for running on linux Arm64:

CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ go build

Of course, the compiled file does not include Libtorch! You have to install libtorch in your server as many C/C++ libraries.

On other note, if you train your model in Amd64 and compile to run inference on Arm64 platform, the result may be different as Pytorch libtorch for 2 platforms are different (somebody mentioned it and I had one model that infers differently with the 2 platform). I haven't tried on Nvidia Jetson for GPU yet but if you can, I would love to know about.

Hope that helps.

from gotch.

HaoboGu avatar HaoboGu commented on August 24, 2024

Hello @sugarme , thanks for the reply! I'm trying to build a distributed linux executable from MacOS, which means I have to include libtorch in the compiled executable. Is it possible?

from gotch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.