Skip to content

Commit

Permalink
update for release
Browse files Browse the repository at this point in the history
  • Loading branch information
kailaix committed Apr 28, 2020
1 parent 45503b6 commit 2e95f27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 1 addition & 6 deletions examples/gpu_custom_op/gputest.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using ADCME
using PyCall
using LinearAlgebra
using PyPlot
using Random
Random.seed!(233)

function gpu_test(a)
gpu_test_ = load_op_and_grad("$(@__DIR__)/build/libGpuTest","gpu_test")
Expand All @@ -12,7 +7,7 @@ function gpu_test(a)
end

# TODO: specify your input parameters
a = rand(100)
a = rand(3)
u = gpu_test(a)
sess = Session(); init(sess)
v1 = run(sess, u)
Expand Down
8 changes: 8 additions & 0 deletions src/extra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,14 @@ and `nvcc` is in your path.""")

end


"""
test_gpu()
Tests the GPU ultilities
"""
function test_gpu()
PWD = pwd()
run(`which nvcc`)
cd("$(@__DIR__)/../examples/gpu_custom_op")
mkdir("build")
Expand All @@ -741,4 +748,5 @@ function test_gpu()
ADCME.make()
cd("..")
include("gputest.jl")
cd(PWD)
end

2 comments on commit 2e95f27

@kailaix
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/13770

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.1 -m "<description of version>" 2e95f2754cba819813add26d1195a6c2c29147c9
git push origin v0.5.1

Please sign in to comment.