861: GPU CI maintainance  r=dhairyagandhi96 a=dhairyagandhi96



Co-authored-by: Dhairya Gandhi <dhairya@juliacopmuting.com>
This commit is contained in:
bors[bot] 2019-09-24 16:06:13 +00:00 committed by GitHub
commit d57636fd48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 20 deletions

View File

@ -5,7 +5,7 @@ variables:
CI_IMAGE_TAG: 'cuda' CI_IMAGE_TAG: 'cuda'
include: include:
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v3/common.yml' - 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v4/common.yml'
.flux: .flux:
extends: .test extends: .test
@ -13,8 +13,6 @@ include:
- julia -e 'using InteractiveUtils; - julia -e 'using InteractiveUtils;
versioninfo()' versioninfo()'
- mkdir $JULIA_DEPOT_PATH # Pkg3.jl#325 - mkdir $JULIA_DEPOT_PATH # Pkg3.jl#325
- julia -e 'using Pkg;
Pkg.add("CuArrays");'
- julia --project -e 'using Pkg; - julia --project -e 'using Pkg;
Pkg.instantiate(); Pkg.instantiate();
Pkg.build(); Pkg.build();
@ -24,14 +22,30 @@ test:v1.0:
extends: .flux extends: .flux
variables: variables:
CI_VERSION_TAG: 'v1.0' CI_VERSION_TAG: 'v1.0'
only:
- staging
- trying
test:v1.1: test:v1.1:
extends: .flux extends: .flux
variables: variables:
CI_VERSION_TAG: 'v1.1' CI_VERSION_TAG: 'v1.1'
only:
- staging test:v1.2:
- trying extends: .flux
variables:
CI_VERSION_TAG: 'v1.2'
test:v1.3:
extends: .flux
variables:
CI_VERSION_TAG: 'v1.3'
test:v1.0:
extends: .flux
variables:
CI_VERSION_TAG: 'v1.0'
test:dev:
extends: .flux
variables:
CI_VERSION_TAG: 'dev'
allow_failure: true

View File

@ -31,7 +31,7 @@ CUDAapi = "1.1"
CuArrays = "1.2" CuArrays = "1.2"
NNlib = "0.6" NNlib = "0.6"
Zygote = "0.3" Zygote = "0.3"
julia = "1.1" julia = "1"
[extras] [extras]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

View File

@ -83,12 +83,14 @@ function rnnWorkspaceSize(r::RNNDesc, seqlen, xdesc)
return Int(size[]) return Int(size[])
end end
const workspace = [CuVector{UInt8}(undef, 1)] const workspace = Ref{Union{Nothing,CuVector{UInt8}}}(nothing)
getworkspace(bytes) = function getworkspace(bytes)
length(workspace[]) bytes ? if workspace[] === nothing || length(workspace[]) < bytes
workspace[] : workspace[] = CuVector{UInt8}(undef, bytes)
(workspace[] = CuVector{UInt8}(undef, bytes)) end
workspace[]
end
getworkspace(r::RNNDesc, seqlen, xdesc) = getworkspace(r::RNNDesc, seqlen, xdesc) =
getworkspace(rnnWorkspaceSize(r, seqlen, xdesc)) getworkspace(rnnWorkspaceSize(r, seqlen, xdesc))

View File

@ -1,4 +1,5 @@
using Flux, CuArrays, Test using Flux, Test
using Flux.CuArrays
using Flux: gpu using Flux: gpu
@info "Testing GPU Support" @info "Testing GPU Support"