Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix doc deploy #18

Merged
merged 2 commits into from
Feb 12, 2024
Merged
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
35 changes: 31 additions & 4 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,41 @@ on:
tags: [v*]
pull_request:

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
Documenter:
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
# needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: write
statuses: write
steps:
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: julia-actions/cache@v1
- name: Configure doc environment
shell: julia --project=docs --color=yes {0}
run: |
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- name: Run doctests
shell: julia --project=docs --color=yes {0}
run: |
using Documenter: DocMeta, doctest
using TensorCore
DocMeta.setdocmeta!(TensorCore, :DocTestSetup, :(using TensorCore); recursive=true)
doctest(TensorCore)
12 changes: 6 additions & 6 deletions src/TensorCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ For arrays `a` and `b`, perform elementwise multiplication.
julia> a = [2, 3]; b = [5, 7];

julia> a ⊙ b
2-element Array{$Int,1}:
2-element Vector{$Int}:
10
21

julia> a ⊙ [5]
ERROR: DimensionMismatch("Axes of `A` and `B` must match, got (Base.OneTo(2),) and (Base.OneTo(1),)")
ERROR: DimensionMismatch: Axes of `A` and `B` must match, got (Base.OneTo(2),) and (Base.OneTo(1),)
[...]
```

Expand Down Expand Up @@ -74,7 +74,7 @@ For vectors `v` and `w`, the Kronecker product is related to the tensor product
julia> a = [2, 3]; b = [5, 7, 11];

julia> a ⊗ b
2×3 Array{$Int,2}:
2×3 Matrix{$Int}:
10 14 22
15 21 33
```
Expand Down Expand Up @@ -164,13 +164,13 @@ and hence may sometimes return another `Adjoint` vector. (And similarly for `Tra
julia> M = rand(5,5); v = rand(5);

julia> typeof(v ⊡ M')
Array{Float64,1}
Vector{Float64} (alias for Array{Float64, 1})

julia> typeof(M ⊡ v') # adjoint of the previous line
Adjoint{Float64,Array{Float64,1}}
LinearAlgebra.Adjoint{Float64, Vector{Float64}}

julia> typeof(v' ⊡ M') # same as *, and equal to adjoint(M ⊡ v)
Adjoint{Float64,Array{Float64,1}}
LinearAlgebra.Adjoint{Float64, Vector{Float64}}

julia> typeof(v' ⊡ v)
Float64
Expand Down
Loading