DiffSharp / DiffSharp

DiffSharp: Differentiable Functional Programming
http://diffsharp.github.io
BSD 2-Clause "Simplified" License
589 stars 67 forks source link

Automatic CI testing Torch backend on GPU #122

Open dsyme opened 4 years ago

dsyme commented 4 years ago

@pkese has done some great work testing the Torch backend with GPU enabled.

See discussion from https://github.com/xamarin/TorchSharp/issues/143#issuecomment-637669892

Let's continue the discussion here since it's about DiffSharp not TorchSharp now

dsyme commented 4 years ago

@pkese reports that all tests now pass!

https://github.com/DiffSharp/DiffSharp/pull/121#issuecomment-637740358

We will now need to automate the testing both in-repo and during CI

dsyme commented 4 years ago

Just to note that Torch testing on GPU could in theory be automated in Azure DevOps using GPU-enabled containers. However

https://docs.microsoft.com/en-us/azure/container-instances/container-instances-gpu

VisualMelon commented 4 years ago

Would a PR along the lines of https://github.com/DiffSharp/DiffSharp/compare/dev...VisualMelon:GpuTest be welcome? It makes it easier to test with GPU because you don't need to make any code change (I can set DIFFSHARP_TESTGPU=true for my user and it will always test with GPU). Something like this would be necessary for testing on a dedicated CI. I'm not attached to DIFFSHARP_TESTGPU if others don't like the name. (Note: I can't test GPU on linux at the moment)

dsyme commented 4 years ago

Yes that looks good

Maybe add to DEVGUIDE.md the single-line invocation of dotnet test providing the property on the command line for cut-and-paste

VisualMelon commented 4 years ago

Done. I'll open a PR.