Giter Club home page Giter Club logo

vsixtorch's Introduction

VSIXTorch

It helps deverlopers to setup PyTorch C++ Project on Windows without CMake. So far, it only supports VS 2019. It's NOT available on VS 2022

Visual Studio Extension Download Link

LibTorch Project Template

Libtorch Download Link

Pytorch.org only provide the latest libtorch binary links. Generally, the libtorch download links

Debug
https://download.pytorch.org/libtorch/{cuda-version}/libtorch-win-shared-with-deps-debug-{pytorch-version}%2B{cuversion}.zip

Release
https://download.pytorch.org/libtorch/{cuda-version}/libtorch-win-shared-with-deps{pytorch-version}%2B{cuversion}.zip

For example Libtorch {1.11.0 cu113 debug} download link is
https://download.pytorch.org/libtorch/cu113/libtorch-win-shared-with-deps-debug-1.11.0%2Bcu113.zip
If it's a cpu version, the {cuda-version} is cpu

There's a fantastic link to download all released libtorch binaries.

https://blog.csdn.net/guzhao9901/article/details/125051108

How to build dll

  1. Change Project settings->Configuration Properties->General->Configuration Type to Dynamic Library(.dll)
  2. Change Project settings->Configuration Properties->Advanced->Target File Extension to dll

example

#include <torch/torch.h>
extern "C" __declspec(dllexport) int check_cuda() 
{
    if (torch::cuda::is_available()) {
        return 1;
    }
    else
    {
        return 0;
    }
}

Tutorial Video

https://ossci-windows.s3.us-east-1.amazonaws.com/vsextension/demo.mp4)

vsixtorch's People

Contributors

mszhanyi avatar

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.