-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding GPU testing to Github workflows #802
Comments
I believe that what you propose in this issue is very important for us. Here are my opinions on the questions:
|
@naili-xing Naili, since you told us that you would like to contribute in SINGA, could you assist us to implement this (currently we have cpu test, but we also need GPU test) |
@moazreyad could you please advise us how to achieve the goal? (Adding GPU testing to Github workflows |
Ok, i will look into it |
FYI, the different between CPU version and GPU version in building SINGA is just the flag we used in cmake CPU version: https://github.com/apache/singa/blob/master/tool/docker/devel/ubuntu/cpu/Dockerfile#L67 In GPU version, it include all the GPU test case when we run test/python/run.py |
To achieve this goal, we will need these steps: First, we need to get github tokens from by opening a ticket at Apache INFRA. Apache has some information about github self hosted runners here. They don't recommend using it for some security reasons, so we have to explain that GPU build and test is important for SINGA. We also need to make sure the server which will run the github workflows is secure and that the known vulnerabilities of self-hosted runners will not occur in the NUS server. (for example, someone may login to the NUS server and gain access to SINGA github repository admin tokens.) To complete this step, we may check this ticket by Apache Arrow and open a similar one for SINGA. Second, we create a docker image for the Runner and configure the workflows. If we use Linux, we need to install the Runner and its pre-reqs in the Linux docker machine. The machine should also have the github tokens from the first step. Check the Apache Arrow implementation for more details. |
@moazreyad thanks a lot for the information, I will consider it. Also I am thinking about if GPU emulator is another option? https://developer.nvidia.com/nvemulate @naili-xing do you think the github actions can access our server to do gpu test, does it need to connect to nus VPN? |
I think it needs, if accessing the server from outside of nus, it needs vpn, if access from inside, using nus network, i think there is no needs |
@joddiy will help us try if gpu emulator can run our test case first |
Hi, @chrishkchris , these two GPU emulators haven't been updated for more than 5 years. And since we have our own machine, the self-hosted GitHub Actions is a better solution. The only question is, @naili-xing , we cannot connect our machine from outside without a VPN. So maybe it's more feasible to listen to the update of the commit from our machine, once get such an update, run the test and push the result to the Github Actions. |
@joddiy OK, then we go for the solution using our own machine gpu for github actions test first. For our reference: communication between our server and github actions |
https://docs.github.com/en/free-pro-team@latest/actions/hosting-your-own-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github |
@moazreyad I have opened a ticket to ask the infrastructure and hopes they can give us a solution https://issues.apache.org/jira/projects/INFRA/issues/INFRA-21115?filter=allopenissues |
@moazreyad @joddiy |
@naili-xing I think before implementation on the SINGA repo, we fork the repo to test the github actions with our own github account first. Could you follow the following steps for the test
We evaluate the approach first before implementing it in apache/SINGA repo |
ok
Chris Yeung <[email protected]>于2020年11月19日 周四下午4:49写道:
… @naili-xing <https://github.com/naili-xing>
I think before implementation on the SINGA repo, we fork the repo to test
the github actions with our own github account first.
Could you follow the following steps for the test
1. fork the singa repo to your github acoount
2. make the forked repo private (throughout the test to ensure the
safety of our server), add me as a collaborator of the forked repo so I can
also access it
3. implement the github actions code for gpu test:
We create a docker image for the Runner and configure the workflows.
If we use Linux, we need to install the Runner
<https://github.com/actions/runner> and its pre-reqs
<https://github.com/actions/runner/blob/main/docs/start/envlinux.md>
in the Linux docker machine. The machine should also have the github tokens
from the first step. Check the Apache Arrow implementation
<apache/arrow#6512> for more details.
We evaluate the approach first before implementing it in Github repo
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#802 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANUF6L2MTHEJUBJ33XDZY4DSQTLY5ANCNFSM4RX6WZWQ>
.
|
The GPU testing will improve the code coverage and by the way, there is a problem in the current testing workflows: since around two months, the Python tests disappeared from the codecov report in the dev branch and they are never executed in the master branch. Probably a pull request did something that disabled the Python tests. I tried to check quickly, but I think it needs more investigation. The last codecov report with the Python test is here with code coverage = 70%. The codecov report of the next commit shows no Python test here with code coverage drops to 63.7%. |
If the connection between NUS self-hosted runners and Github servers is not possible because of NUS network restrictions, then another solution can be considered: self-hosting Github itself using Github Enterprise. The cost is $21 per user per month, but there are special discounted licenses for universities. In this case both Github and the Github runners are hosted locally in the same network. (But again I guess we need to configure the DNS of the SINGA github repository to point to the locally hosted github, so we must have some NUS network configuration for external access but may be it is easier?). There is a free trail for Github Enterprise if we want to evaluate it on the NUS server. Otherwise, we just use a cloud-based solution (from Amazon/Microsoft/Google, ..) to execute the GPU Github workflows. There will be a cost for this cloud service time and resources, but it will also save the cost we need to configure and maintain our own GPU testing pipeline. |
umm... cloud service will induce recurrent spending, e.g. if on-demand g4dn.xlarge costs ~0.526USD per hour, every month the recurrent cost seems to be around 0.526USD*24(hour)*30(days)=378USD per month
|
Hi all, I am the creator of Cirun.io, "GPU Testing" caught my eye. FWIW I'll share my two cents. I created a service for problems like these, which is basically running custom machines (including GPUs) in GitHub Actions: https://cirun.io/ It is used in multiple open source projects needing GPU support like the following: It is fairly simple to setup, all you need is a cloud account (AWS or GCP) and a simple yaml file describing what kind of machines you need and Cirun will spin up ephemeral machines on your cloud for GitHub Actions to run. It's native to GitHub ecosystem, which mean you can see logs/trigger in the Github's interface itself, just like any Github Action run. Also, note that Cirun is free for Open source projects. (You only pay to your cloud provider for machine usage) |
Thank you, but to use Cirun.io we need to install Cirun application in Github. This is not possible because SINGA github account is managed by the Apache foundation that must approve the Cirun application and allow it to be installed in SINGA repo. |
This issue is open to discuss different options for adding GPU build and test to Github workflows.
To enable this feature, SINGA must provide a real or virtual machine with GPU as host machine for running the workflow. Then use the self-hosted runner feature of Github Actions. See also this MLOps video tutorial.
The team need to take some decisions:
What do you think?
The text was updated successfully, but these errors were encountered: