From 67ecb5e89f970eab3a7165f0af3ede8e31d639de Mon Sep 17 00:00:00 2001 From: Yi-Te Huang Date: Tue, 31 Oct 2023 21:32:30 +0900 Subject: [PATCH] fix docs and CI --- .buildkite/pipeline.yml | 19 +++++++++++++++ .github/workflows/Runtests.yml | 2 -- docs/src/extensions/CUDA.md | 42 ++++++++++++---------------------- 3 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 .buildkite/pipeline.yml diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 00000000..807314b5 --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,19 @@ +steps: + - label: "HierarchicalEOM_CUDAExt" + plugins: + - JuliaCI/julia#v1: + version: "1" + - JuliaCI/julia-test#v1: + test_args: "--quickfail" + - JuliaCI/julia-coverage#v1: + dirs: + - src + agents: + queue: "juliagpu" + cuda: "*" + env: + GROUP: "HierarchicalEOM_CUDAExt" + SECRET_CODECOV_TOKEN: "kaIXEN51HinaQ4JGclQcIgxeMMtXDb5uvnP3E2eKrH4Eruf2pKd5QwUGcIVL8+rcWeo5FWj883rNxRQEH3YeCWs6/i7vzs+ORvG51QeCNYQgNqFzPsWRcq5qJYc+JPFbisS7q9nghqWTwr52cnjarD4Xx3ceGorMyS5NvFpCNxMgqHNyGkLvipxcTTJfKZK61bpnbntoIjiIO1XSZKjcxnXFGFnolV9BHCr5v8f7F42n2tUH7X3nDHmTBr1AbO2lFAU9ra/KezHcIf0wg2HcV8LZD0+mj8q/SBPjQZSH7cxwx4Q2eTjT4Sw7xnrBGuySVm8ZPCAV7nRNEHo+VqR+GQ==" + timeout_in_minutes: 30 + # Don't run Buildkite if the commit message includes the text [skip tests] + if: build.message !~ /\[skip tests\]/ \ No newline at end of file diff --git a/.github/workflows/Runtests.yml b/.github/workflows/Runtests.yml index 96fd6126..36069c2f 100644 --- a/.github/workflows/Runtests.yml +++ b/.github/workflows/Runtests.yml @@ -21,8 +21,6 @@ jobs: include: - julia-version: '1' group: 'HierarchicalEOM_QOExt' - - julia-version: '1' - group: 'HierarchicalEOM_CUDAExt' steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 diff --git a/docs/src/extensions/CUDA.md b/docs/src/extensions/CUDA.md index 2a7d194e..49ec42e6 100644 --- a/docs/src/extensions/CUDA.md +++ b/docs/src/extensions/CUDA.md @@ -20,30 +20,16 @@ Therefore, we wrapped several functions in `CUDA` and `CUDA.CUSPARSE` in order t The extension will be automatically loaded if user imports the package `CUDA.jl` : ````@example CUDA_Ext_example -using BenchmarkTools using CUDA using HierarchicalEOM using LinearSolve # to change the solver for better GPU performance -using Plots -```` - -### Check version info. of `HierarchicalEOM.jl` - -````@example CUDA_Ext_example -HierarchicalEOM.versioninfo() -```` - -### Check version info. of `CUDA.jl` - -````@example CUDA_Ext_example -CUDA.versioninfo() ```` ### Setup Here, we demonstrate this extension by using the example of [the single-impurity Anderson model](@ref exp-SIAM). -````@example CUDA_Ext_example +```julia ϵ = -5 U = 10 Γ = 2 @@ -78,31 +64,31 @@ M_odd_gpu = cu(M_odd_cpu) # solve steady state with CPU ados_ss = SteadyState(M_even_cpu); -```` +``` !!! note "Note" This extension does not support for solving [`SteadyState`](@ref doc-Stationary-State) on GPU since it is not efficient and might get wrong solutions. If you really want to obtain the stationary state with GPU, you can repeatedly solve the [`evolution`](@ref doc-Time-Evolution) until you find it. ### Solving time evolution with CPU -````@example CUDA_Ext_example -@benchmark ados_list_cpu = evolution(M_even_cpu, ρ0, tlist; verbose=false) -```` +```julia +ados_list_cpu = evolution(M_even_cpu, ρ0, tlist; verbose=false) +``` ### Solving time evolution with GPU -````@example CUDA_Ext_example -@benchmark ados_list_gpu = evolution(M_even_gpu, ρ0, tlist; verbose=false) -```` +```julia +ados_list_gpu = evolution(M_even_gpu, ρ0, tlist; verbose=false) +``` ### Solving Spectrum with CPU -````@example CUDA_Ext_example -@benchmark dos_cpu = spectrum(M_odd_cpu, ados_ss, d_up, ωlist; verbose=false) -```` +```julia +dos_cpu = spectrum(M_odd_cpu, ados_ss, d_up, ωlist; verbose=false) +``` ### Solving Spectrum with GPU -````@example CUDA_Ext_example -@benchmark dos_gpu = spectrum(M_odd_gpu, ados_ss, d_up, ωlist; solver=KrylovJL_BICGSTAB(rtol=1f-10, atol=1f-12), verbose=false) -```` \ No newline at end of file +```julia +dos_gpu = spectrum(M_odd_gpu, ados_ss, d_up, ωlist; solver=KrylovJL_BICGSTAB(rtol=1f-10, atol=1f-12), verbose=false) +``` \ No newline at end of file