Git Product home page Git Product logo

Comments (17)

Looong01 avatar Looong01 commented on July 4, 2024

Should I upgrade my gcc version up to gcc-11 or gcc-12?

from antares.

ghostplant avatar ghostplant commented on July 4, 2024

Hi, antares is a compiler that can make your custom DNN computation (e.g. matmul/..) runnable on Windows ROCm. You can follow examples below to see how antares work for Windows ROCm:

# Save Runnable Source code as file
BACKEND=c-rocm_win64 antares save ./kernel_example.cpp

# Reproduce kernel evaluation based on an early saved source code:
BACKEND=c-rocm_win64 antares eval ./kernel_example.cpp

# Freeze kernels and compiled into edge-side binaries:
BACKEND=c-rocm_win64 antares compile ./kernel_example.cpp ./output-dest/
# Build solution in destination directory:
cd ./output-dest && make

from antares.

Looong01 avatar Looong01 commented on July 4, 2024

Hi, Antares is a compiler that can make your custom DNN computation (e.g. matmul/..) runnable on Windows ROCm. You can follow examples below to see how antares work for Windows ROCm:

# Save Runnable Source code as file
BACKEND=c-rocm_win64 antares save ./kernel_example.cpp

# Reproduce kernel evaluation based on an early saved source code:
BACKEND=c-rocm_win64 antares eval ./kernel_example.cpp

# Freeze kernels and compiled into edge-side binaries:
BACKEND=c-rocm_win64 antares compile ./kernel_example.cpp ./output-dest/
# Build solution in destination directory:
cd ./output-dest && make

Hi, how can I solve this error: "error: ‘CHECK_EQ’ was not declared in this scope; did you mean ‘CHECK_OK’?", when I use "AMDGFX=gfx1031 BACKEND=c-rocm_win64 Antares torch-setup"?

from antares.

Looong01 avatar Looong01 commented on July 4, 2024

Besides, your command returned this error:
image

from antares.

ghostplant avatar ghostplant commented on July 4, 2024

Oh, you need export AMDGFX=gfx1031 for your GPU model.

from antares.

Looong01 avatar Looong01 commented on July 4, 2024

Oh, you need export AMDGFX=gfx1031 for your GPU model.

And how can I solve this error: "error: ‘CHECK_EQ’ was not declared in this scope; did you mean ‘CHECK_OK’?", when I use "AMDGFX=gfx1031 BACKEND=c-rocm_win64 Antares torch-setup"?

I have upgrade my gcc and g++ and g++-mingw-w64-x86-64 to version 11 that supports C++17.
But it still gave many errors when I setup Antares plugin for pytorch.

(All the errors came from the backend.hpp of Antares.)

I'll be happy to hear from you!
Thanks a lot!

from antares.

ghostplant avatar ghostplant commented on July 4, 2024

antares torch-setup is only for "Pytorch CPU/CUDA/ROCm for Linux", since no such Pytorch ROCm build for Windows exists for Antares to be as its plugin, even though Antares itself can produce user-defined standalone Windows ROCm kernels & executable that is runnable on Windows without depending on Pytorch.

from antares.

Looong01 avatar Looong01 commented on July 4, 2024

antares torch-setup is only for "Pytorch CPU/CUDA/ROCm for Linux", since no such Pytorch ROCm build for Windows exists for Antares to be as its plugin, even though Antares itself can produce user-defined standalone Windows ROCm kernels & executable that is runnable on Windows without depending on Pytorch.

So, I still cannot run PyTorch ROCm version in WSL2 with Antares?

from antares.

ghostplant avatar ghostplant commented on July 4, 2024

You can run custom computation with ROCm, but cannot run Linux-based Pytorch ROCm,

from antares.

ghostplant avatar ghostplant commented on July 4, 2024

Public Pytorch ROCm for Linux doesn't contain GPU codes for gfx1031, so it is impossible for you to use it in this way.
We're going to publish "Antares plugin for Pytorch CPU for Windows to extend ROCm ops", as this is possible to make native Windows Pytorch to utilize ROCm gfx1031 without WSL needed. But every operator computation has to be customized and generated by you according to standard Antares usage.

from antares.

Looong01 avatar Looong01 commented on July 4, 2024

Public Pytorch ROCm for Linux doesn't contain GPU codes for gfx1031, so it is impossible for you to use it in this way. We're going to publish "Antares plugin for Pytorch CPU for Windows to extend ROCm ops", as this is possible to make native Windows Pytorch to utilize ROCm gfx1031 without WSL needed. But every operator computation has to be customized and generated by you according to standard Antares usage.

I noticed another program of Microsoft, PyTorch-DirectML, which can allow me to run PyTorch on AMD GPU. But it does not support many operators. For example, it does not support "aten::index_select" when I run a seq2seq model for the first time. And after 6 months I submitted an issue to them, they upgraded their version and support it now. As I ran seq2seq again, it returned it does not support another one, "aten::scatter_add.out". It really exhausts me.

You said, "every operator computation has to be customized and generated by you according to standard Antares usage.".
Do you mean that I had to override all the operators of PyTorch when I want to use it?

Will "Antares plugin for Pytorch CPU for Windows" support all the native and original PyTorch operators?

from antares.

Looong01 avatar Looong01 commented on July 4, 2024

Public Pytorch ROCm for Linux doesn't contain GPU codes for gfx1031, so it is impossible for you to use it in this way. We're going to publish "Antares plugin for Pytorch CPU for Windows to extend ROCm ops", as this is possible to make native Windows Pytorch to utilize ROCm gfx1031 without WSL needed. But every operator computation has to be customized and generated by you according to standard Antares usage.

Besides, you said that "Public Pytorch ROCm for Linux doesn't contain GPU codes for gfx1031".
So, if gfx1030 GPU (RX 6800) substitutes for my gfx1031 GPU (RX 6700XT), will it work? I know ROCm supports gfx1030 natively.

from antares.

ghostplant avatar ghostplant commented on July 4, 2024

Public Pytorch ROCm for Linux doesn't contain GPU codes for gfx1031, so it is impossible for you to use it in this way. We're going to publish "Antares plugin for Pytorch CPU for Windows to extend ROCm ops", as this is possible to make native Windows Pytorch to utilize ROCm gfx1031 without WSL needed. But every operator computation has to be customized and generated by you according to standard Antares usage.

Besides, you said that "Public Pytorch ROCm for Linux doesn't contain GPU codes for gfx1031". So, if gfx1030 GPU (RX 6800) substitutes for my gfx1031 GPU (RX 6700XT), will it work? I know ROCm supports gfx1030 natively.

If you install a prebuilt Pytorch ROCm with gfx1030 bincode included, it should be possible by a virtual stack between WSL and Windows ROCm driver, but it is not relevant to Antares.

from antares.

ghostplant avatar ghostplant commented on July 4, 2024

Public Pytorch ROCm for Linux doesn't contain GPU codes for gfx1031, so it is impossible for you to use it in this way. We're going to publish "Antares plugin for Pytorch CPU for Windows to extend ROCm ops", as this is possible to make native Windows Pytorch to utilize ROCm gfx1031 without WSL needed. But every operator computation has to be customized and generated by you according to standard Antares usage.

I noticed another program of Microsoft, PyTorch-DirectML, which can allow me to run PyTorch on AMD GPU. But it does not support many operators. For example, it does not support "aten::index_select" when I run a seq2seq model for the first time. And after 6 months I submitted an issue to them, they upgraded their version and support it now. As I ran seq2seq again, it returned it does not support another one, "aten::scatter_add.out". It really exhausts me.

You said, "every operator computation has to be customized and generated by you according to standard Antares usage.". Do you mean that I had to override all the operators of PyTorch when I want to use it?

Will "Antares plugin for Pytorch CPU for Windows" support all the native and original PyTorch operators?

Yes, DirectML lacks many ops, and it should be the same for Antares, but Antares allows yourself to extend those missing ops, instead of waiting for DirectML developers to do this extension.

from antares.

Looong01 avatar Looong01 commented on July 4, 2024

Public Pytorch ROCm for Linux doesn't contain GPU codes for gfx1031, so it is impossible for you to use it in this way. We're going to publish "Antares plugin for Pytorch CPU for Windows to extend ROCm ops", as this is possible to make native Windows Pytorch to utilize ROCm gfx1031 without WSL needed. But every operator computation has to be customized and generated by you according to standard Antares usage.

Besides, you said that "Public Pytorch ROCm for Linux doesn't contain GPU codes for gfx1031". So, if gfx1030 GPU (RX 6800) substitutes for my gfx1031 GPU (RX 6700XT), will it work? I know ROCm supports gfx1030 natively.

If you install a prebuilt Pytorch ROCm with gfx1030 bincode included, it should be possible by a virtual stack between WSL and Windows ROCm driver, but it is not relevant to Antares.

So, you mean ROCm or PyTorch ROCm natively supports WSL with gfx1030?

And the last question: What is antares torch-setup used for? What can I do with it?

from antares.

ghostplant avatar ghostplant commented on July 4, 2024

So, you mean ROCm or PyTorch ROCm natively supports WSL with gfx1030?

  • Nop, you still a virtual stack, and I think no one has time to develop this currently.

And the last question: What is antares torch-setup used for? What can I do with it?

  • Previous antares torch-setup is for Pytorch Linux only. In WSL environment, you Pytorch usually enable CPU device only, so antares torch-setup can extend CPU ops for that Pytorch.

from antares.

Looong01 avatar Looong01 commented on July 4, 2024

So, you mean ROCm or PyTorch ROCm natively supports WSL with gfx1030?

  • Nop, you still a virtual stack, and I think no one has time to develop this currently.

And the last question: What is antares torch-setup used for? What can I do with it?

  • antares torch-setup is for Pytorch Linux only. In WSL environment, you Pytorch usually enable CPU device only, so antares torch-setup can extend CPU ops for that Pytorch.

Virtual stack? Like GPU-PV on Hyper-V that the virtual machine can use GPU directly? I have tried it, but it failed. It seems that Cross-OS GPU-PV does not exist (physical machine is Windows, and virtual machine is Ubuntu)

from antares.

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.