Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
590 changes: 550 additions & 40 deletions docs/Manifest.toml

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd"
cuStateVec = "92f7fd98-d22e-4c0d-85a8-6ade11b672fb"
cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1"
cuTensorNet = "448d79b3-4b49-4e06-a5ea-00c62c0dc3db"

[sources]
CUDA = {path = ".."}
cuDNN = {path = "../lib/cudnn"}
cuStateVec = {path = "../lib/custatevec"}
cuTENSOR = {path = "../lib/cutensor"}
cuTensorNet = {path = "../lib/cutensornet"}

[compat]
Documenter = "1"
Expand Down
56 changes: 45 additions & 11 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Documenter, Literate
using CUDA
using CUDA.CUBLAS, CUDA.CUFFT, CUDA.CUPTI, CUDA.CURAND, CUDA.CUSOLVER, CUDA.CUSPARSE, CUDA.NVML, CUDA.APIUtils
using cuDNN, cuStateVec, cuTENSOR, cuTensorNet

const src = "https://github.com/JuliaGPU/CUDA.jl"
const dst = "https://cuda.juliagpu.org/stable/"
Expand All @@ -9,17 +11,23 @@ function main()

@info "Building Literate.jl documentation"
cd(@__DIR__) do
Literate.markdown("src/tutorials/introduction.jl", "src/tutorials";
repo_root_url="$src/blob/master/docs")
Literate.markdown("src/tutorials/custom_structs.jl", "src/tutorials";
repo_root_url="$src/blob/master/docs")
Literate.markdown("src/tutorials/performance.jl", "src/tutorials";
repo_root_url="$src/blob/master/docs")
Literate.markdown(
"src/tutorials/introduction.jl", "src/tutorials";
repo_root_url = "$src/blob/master/docs"
)
Literate.markdown(
"src/tutorials/custom_structs.jl", "src/tutorials";
repo_root_url = "$src/blob/master/docs"
)
Literate.markdown(
"src/tutorials/performance.jl", "src/tutorials";
repo_root_url = "$src/blob/master/docs"
)
end
println()

@info "Generating Documenter.jl site"
DocMeta.setdocmeta!(CUDA, :DocTestSetup, :(using CUDA); recursive=true)
DocMeta.setdocmeta!(CUDA, :DocTestSetup, :(using CUDA); recursive = true)
makedocs(
sitename = "CUDA.jl",
authors = "Tim Besard",
Expand All @@ -33,13 +41,27 @@ function main()
),
doctest = true,
warnonly = [:missing_docs],
modules = [CUDA],
modules = [
CUDA,
CUBLAS,
CUFFT,
CUPTI,
CURAND,
CUSOLVER,
CUSPARSE,
NVML,
APIUtils,
cuDNN,
cuStateVec,
cuTENSOR,
cuTensorNet,
],
pages = Any[
"Home" => "index.md",
"Tutorials" => Any[
"tutorials/introduction.md",
"tutorials/custom_structs.md",
"tutorials/performance.md"
"tutorials/performance.md",
],
"Installation" => Any[
"installation/overview.md",
Expand Down Expand Up @@ -67,13 +89,25 @@ function main()
"api/compiler.md",
],
"Library reference" => Any[
"lib/driver.md",
"lib/cublas.md",
"lib/cudadrv.md",
"lib/cudnn.md",
"lib/cufft.md",
"lib/cupti.md",
"lib/curand.md",
"lib/cusolver.md",
"lib/cusparse.md",
"lib/custatevec.md",
"lib/cutensor.md",
"lib/cutensornet.md",
"lib/nvml.md",
"lib/utils.md",
],
"FAQ" => "faq.md",
]
)

if ci
return if ci
@info "Deploying to GitHub"
deploydocs(
repo = "github.com/JuliaGPU/CUDA.jl.git",
Expand Down
19 changes: 19 additions & 0 deletions docs/src/lib/cublas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# CUBLAS

```@meta
CurrentModule = CUBLAS
```

## Public

```@autodocs
Modules = [CUBLAS]
Private = false
```

## Private

```@autodocs
Modules = [CUBLAS]
Public = false
```
File renamed without changes.
19 changes: 19 additions & 0 deletions docs/src/lib/cudnn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# cuDNN

```@meta
CurrentModule = cuDNN
```

## Public

```@autodocs
Modules = [cuDNN]
Private = false
```

## Private

```@autodocs
Modules = [cuDNN]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/cufft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# CUFFT

```@meta
CurrentModule = CUFFT
```

## Public

```@autodocs
Modules = [CUFFT]
Private = false
```

## Private

```@autodocs
Modules = [CUFFT]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/cupti.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# CUPTI

```@meta
CurrentModule = CUPTI
```

## Public

```@autodocs
Modules = [CUPTI]
Private = false
```

## Private

```@autodocs
Modules = [CUPTI]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/curand.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# CURAND

```@meta
CurrentModule = CURAND
```

## Public

```@autodocs
Modules = [CURAND]
Private = false
```

## Private

```@autodocs
Modules = [CURAND]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/cusolver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# CUSOLVER

```@meta
CurrentModule = CUSOLVER
```

## Public

```@autodocs
Modules = [CUSOLVER]
Private = false
```

## Private

```@autodocs
Modules = [CUSOLVER]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/cusparse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# CUSPARSE

```@meta
CurrentModule = CUSPARSE
```

## Public

```@autodocs
Modules = [CUSPARSE]
Private = false
```

## Private

```@autodocs
Modules = [CUSPARSE]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/custatevec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# cuStateVec

```@meta
CurrentModule = cuStateVec
```

## Public

```@autodocs
Modules = [cuStateVec]
Private = false
```

## Private

```@autodocs
Modules = [cuStateVec]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/cutensor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# cuTENSOR

```@meta
CurrentModule = cuTENSOR
```

## Public

```@autodocs
Modules = [cuTENSOR]
Private = false
```

## Private

```@autodocs
Modules = [cuTENSOR]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/cutensornet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# cuTensorNet

```@meta
CurrentModule = cuTensorNet
```

## Public

```@autodocs
Modules = [cuTensorNet]
Private = false
```

## Private

```@autodocs
Modules = [cuTensorNet]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/nvml.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# NVML

```@meta
CurrentModule = NVML
```

## Public

```@autodocs
Modules = [NVML]
Private = false
```

## Private

```@autodocs
Modules = [NVML]
Public = false
```
19 changes: 19 additions & 0 deletions docs/src/lib/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# APIUtils

```@meta
CurrentModule = APIUtils
```

## Public

```@autodocs
Modules = [APIUtils]
Private = false
```

## Private

```@autodocs
Modules = [APIUtils]
Public = false
```
15 changes: 14 additions & 1 deletion lib/cusparse/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ function CUDA.unsafe_free!(xs::CuSparseVector)
return
end

"""
CuSparseMatrixCSC

Container to hold sparse matrices in compressed sparse column (CSC) format on the
GPU.

!!! note
Most CUSPARSE operations work with CSR formatted matrices, rather
than CSC.
"""
mutable struct CuSparseMatrixCSC{Tv, Ti} <: AbstractCuSparseMatrix{Tv, Ti}
colPtr::CuVector{Ti}
rowVal::CuVector{Ti}
Expand Down Expand Up @@ -92,6 +102,8 @@ function CUDA.unsafe_free!(xs::CuSparseMatrixCSR)
end

"""
CuSparseMatrixBSR

Container to hold sparse matrices in block compressed sparse row (BSR) format on
the GPU. BSR format is also used in Intel MKL, and is suited to matrices that are
"block" sparse - rare blocks of non-sparse regions.
Expand Down Expand Up @@ -122,6 +134,8 @@ function CUDA.unsafe_free!(xs::CuSparseMatrixBSR)
end

"""
CuSparseMatrixCOO

Container to hold sparse matrices in coordinate (COO) format on the GPU. COO
format is mainly useful to initially construct sparse matrices, afterwards
switch to [`CuSparseMatrixCSR`](@ref) for more functionality.
Expand Down Expand Up @@ -782,4 +796,3 @@ function Adapt.adapt_structure(to::CUDA.KernelAdaptor, x::CuSparseArrayCSR)
size(x), x.nnz
)
end