Skip to content

Document all public symbols [skip tests]#653

Open
gdalle wants to merge 1 commit into
JuliaGPU:mainfrom
gdalle:gd/docs_tlc2
Open

Document all public symbols [skip tests]#653
gdalle wants to merge 1 commit into
JuliaGPU:mainfrom
gdalle:gd/docs_tlc2

Conversation

@gdalle

@gdalle gdalle commented Nov 14, 2025

Copy link
Copy Markdown

Supersedes #647

The main question remains: how much do we want to document?

@gdalle

gdalle commented Nov 21, 2025

Copy link
Copy Markdown
Author

Gentle bump on what you want documented here @maleadt @kshyatt

@maleadt

maleadt commented Nov 24, 2025

Copy link
Copy Markdown
Member

LGTM, but I'll let @kshyatt go over the sparse array bits here.

@gdalle

gdalle commented Dec 2, 2025

Copy link
Copy Markdown
Author

@kshyatt gentle bump?

@christiangnrd christiangnrd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is probably a scary looking review, but most of the comments are suggestions to replace "Shortcut" with "Alias" since I find when one change is needed in many places and it's not marked in all the places some instances usually get missed.

If @kshyatt doesn't have time to review the sparse arrays stuff, maybe this PR could be split up so the rest can get merged?

- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
version: '1.11'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could it work on 1.12 now?

Suggested change
version: '1.11'
version: '1.12'

Comment thread docs/src/interface.md
Comment on lines +36 to +37
!!! warning
Work in progress.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this trying to say that the docs are a work in progress or the device abstractions?

Comment thread docs/src/interface.md
Comment on lines +39 to +74
## Test suite

GPUArrays provides an extensive test suite that covers all of the functionality that should
be available after implementing the required interfaces. This test suite is part of this
package, but for dependency reasons it is not available when importing the package. Instead,
you should include the code from your `runtests.jl` as follows:

```julia
import GPUArrays
gpuarrays = pathof(GPUArrays)
gpuarrays_root = dirname(dirname(gpuarrays))
include(joinpath(gpuarrays_root, "test", "testsuite.jl"))
```

With this set-up, you can run the test suite like this:

```julia
TestSuite.test(MyGPUArrayType)
```

If you don't want to run the whole suite, you can also run parts of it:

```julia
T = JLArray
GPUArrays.allowscalar(false) # fail tests when slow indexing path into Array type is used.

TestSuite.test_gpuinterface(T) # interface functions like gpu_call, threadidx, etc
TestSuite.test_base(T) # basic functionality like launching a kernel on the GPU and Base operations
TestSuite.test_blas(T) # tests the blas interface
TestSuite.test_broadcasting(T) # tests the broadcasting implementation
TestSuite.test_construction(T) # tests all kinds of different ways of constructing the array
TestSuite.test_linalg(T) # linalg function tests
TestSuite.test_mapreduce(T) # mapreduce sum, etc
TestSuite.test_indexing(T) # indexing tests
TestSuite.test_random(T) # randomly constructed arrays
TestSuite.test_io(T)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see that this was just moved over from a different file but have you checked that these still work?

"""
AbstractGPUVector{T}

Shortcut for `AbstractGPUArray{T, 1}`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit but "alias" seems to be more commonly used in this context

Suggested change
Shortcut for `AbstractGPUArray{T, 1}`.
Alias for `AbstractGPUArray{T, 1}`.

"""
AbstractGPUMatrixT}

Shortcut for `AbstractGPUArray{T, 2}`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Shortcut for `AbstractGPUArray{T, 2}`.
Alias for `AbstractGPUArray{T, 2}`.

"""
StridedJLMatrix{T}

Shortcut for `StridedJLArray{T,2}`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Shortcut for `StridedJLArray{T,2}`.
Alias for `StridedJLArray{T,2}`.

"""
AnyJLVector{T}

Shortcut for `AnyJLArray{T,1}`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Shortcut for `AnyJLArray{T,1}`.
Alias for `AnyJLArray{T,1}`.

"""
AnyJLMatrix{T}

Shortcut for `AnyJLArray{T,2}`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Shortcut for `AnyJLArray{T,2}`.
Alias for `AnyJLArray{T,2}`.

"""
AnyJLVecOrMat{T}

Shortcut for `Union{AnyJLVector{T}, AnyJLMatrix{T}}`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Shortcut for `Union{AnyJLVector{T}, AnyJLMatrix{T}}`.
Alias for `Union{AnyJLVector{T}, AnyJLMatrix{T}}`.

Comment thread src/host/abstractarray.jl

A helper class to manage the storage of an array.

There's multiple reasons we don't just put the data directly in a `GPUArray` struct:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
There's multiple reasons we don't just put the data directly in a `GPUArray` struct:
There are multiple reasons we don't just put the data directly in a `GPUArray` struct:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants