Skip to content

Commit 4372f05

Browse files
committed
Starting with docs
1 parent 7a0708e commit 4372f05

29 files changed

+2955
-4
lines changed

.github/workflows/DocsCleanup.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Doc Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
doc-preview-cleanup:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout gh-pages branch
12+
uses: actions/checkout@v2
13+
with:
14+
ref: gh-pages
15+
16+
- name: Delete preview and history
17+
run: |
18+
git config user.name "oneAPI.jl"
19+
git config user.email "oneapi@juliagpu.github.io"
20+
git rm -rf "previews/PR$PRNUM"
21+
git commit -m "delete preview"
22+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
23+
env:
24+
PRNUM: ${{ github.event.number }}
25+
26+
- name: Push changes
27+
run: |
28+
git push --force origin gh-pages-new:gh-pages

.github/workflows/docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: '*'
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
schedule:
11+
- cron: '0 0 * * 0'
12+
13+
jobs:
14+
docs:
15+
name: Build documentation
16+
env:
17+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
JULIA_DEBUG: Documenter
20+
runs-on: [self-hosted, linux, X64]
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: julia-actions/setup-julia@latest
25+
with:
26+
version: 'lts'
27+
- uses: julia-actions/cache@v2
28+
- uses: julia-actions/julia-buildpkg@latest
29+
- run: julia --project=docs/ docs/make.jl

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ deps/onemkl_lapack.cpp
66
deps/onemkl_lapack.h
77
deps/onemkl_sparse.cpp
88
deps/onemkl_sparse.h
9+
docs/build

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
*Julia support for the oneAPI programming toolkit.*
44

5-
[![][doi-img]][doi-url] [![][buildkite-img]][buildkite-url] [![][codecov-img]][codecov-url]
5+
[![][doi-img]][doi-url] [![][buildkite-img]][buildkite-url] [![][codecov-img]][codecov-url] [![][docs-stable-img]][docs-stable-url] [![][docs-dev-img]][docs-dev-url]
66

77
[doi-img]: https://zenodo.org/badge/252466420.svg
88
[doi-url]: https://zenodo.org/badge/latestdoi/252466420
@@ -13,6 +13,12 @@
1313
[codecov-img]: https://codecov.io/gh/JuliaGPU/oneAPI.jl/branch/master/graph/badge.svg
1414
[codecov-url]: https://codecov.io/gh/JuliaGPU/oneAPI.jl
1515

16+
[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
17+
[docs-stable-url]: https://juliagpu.github.io/oneAPI.jl/stable
18+
19+
[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
20+
[docs-dev-url]: https://juliagpu.github.io/oneAPI.jl/dev
21+
1622
oneAPI.jl provides support for working with the [oneAPI unified programming
1723
model](https://software.intel.com/en-us/oneapi). The package is verified to work with the
1824
(currently) only implementation of this interface [that is part of the Intel Compute

docs/Project.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"
4+
5+
[sources]
6+
oneAPI = {path = "/home/michel/git/oneAPI.jl"}
7+
8+
[compat]
9+
Documenter = "1"

docs/make.jl

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
using Pkg
2+
3+
Pkg.develop(PackageSpec(path=joinpath(dirname(@__FILE__), "..")))
4+
# # when first running instantiate
5+
Pkg.instantiate()
6+
using Documenter
7+
using Documenter.Remotes
8+
using oneAPI
9+
10+
oneAPI.versioninfo()
11+
12+
makedocs(
13+
sitename = "oneAPI.jl",
14+
format = Documenter.HTML(
15+
prettyurls = Base.get(ENV, "CI", nothing) == "true",
16+
canonical = "https://exanauts.github.io/ExaPF.jl/stable/",
17+
mathengine = Documenter.KaTeX(),
18+
),
19+
modules = [oneAPI],
20+
pages = [
21+
"Home" => "index.md",
22+
"Installation" => "installation.md",
23+
"Getting Started" => "getting_started.md",
24+
"Usage" => [
25+
"Array Programming" => "arrays.md",
26+
"Kernel Programming" => "kernels.md",
27+
"Memory Management" => "memory.md",
28+
"Device Intrinsics" => "device.md",
29+
"Performance Guide" => "usage/performance.md",
30+
],
31+
"API Reference" => [
32+
"Overview" => "api.md",
33+
"Context & Device Management" => "api/context.md",
34+
"Array Operations" => "api/arrays.md",
35+
"Kernel Programming" => "api/kernels.md",
36+
"Memory Management" => "api/memory.md",
37+
"Compiler & Reflection" => "api/compiler.md",
38+
"Level Zero (oneL0)" => "level_zero.md",
39+
"oneMKL" => "onemkl.md",
40+
],
41+
"Troubleshooting" => "troubleshooting.md",
42+
],
43+
checkdocs = :none, # Don't error on missing docstrings
44+
warnonly = [:cross_references, :missing_docs], # Only warn, don't error
45+
)
46+
47+
deploydocs(
48+
repo = "github.com/JuliaGPU/oneAPI.jl.git",
49+
target = "build",
50+
devbranch = "main",
51+
devurl = "dev",
52+
push_preview = true,
53+
)
54+

docs/src/api.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# API Reference
2+
3+
This page provides an overview of the oneAPI.jl API. For detailed documentation, see the specific API reference pages:
4+
5+
- [Context & Device Management](api/context.md) - Managing drivers, devices, and contexts
6+
- [Array Operations](api/arrays.md) - Working with GPU arrays
7+
- [Kernel Programming](api/kernels.md) - Writing and launching custom kernels
8+
- [Memory Management](api/memory.md) - Memory allocation and transfer
9+
- [Compiler & Reflection](api/compiler.md) - Code generation and introspection
10+
11+
## Core Functions
12+
13+
```@autodocs
14+
Modules = [oneAPI]
15+
Pages = ["src/context.jl", "src/utils.jl"]
16+
Filter = t -> t !== oneAPI.synchronize
17+
```
18+
19+
## Compiler Functions
20+
21+
```@autodocs
22+
Modules = [oneAPI]
23+
Pages = ["src/compiler/execution.jl", "src/compiler/reflection.jl"]
24+
```
25+
26+
## oneL0 (Level Zero)
27+
28+
Low-level bindings to the Level Zero API. See the [Level Zero page](level_zero.md) for details.
29+
30+
```@autodocs
31+
Modules = [oneAPI.oneL0]
32+
Filter = t -> t !== oneAPI.oneL0.synchronize
33+
```
34+
35+
## oneMKL
36+
37+
Intel oneAPI Math Kernel Library bindings. See the [oneMKL page](onemkl.md) for details.
38+
39+
```@autodocs
40+
Modules = [oneAPI.oneMKL]
41+
```
42+

0 commit comments

Comments
 (0)