Skip to content

Commit ad8698d

Browse files
committed
doc formatting
1 parent e61e809 commit ad8698d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/gpuflow.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,18 @@ flowchart TD
6161
O --- N
6262
```
6363

64+
• The `gpu::Array` (which wraps a GPU buffer with usage and size) and the `gpu::Shape` (which defines dimensions and rank) are combined—via the creation process—to produce a `gpu::Tensor`.
65+
• A `gpu::TensorView` provides a non‑owning view into a slice of a `gpu::Tensor`. Ex. `TensorView view = {tensor, 0, 256};`
66+
`gpu::Bindings` collect multiple Tensors (or TensorViews) along with view offset/size information for use in a kernel.
67+
• The `gpu::TensorPool` (managed by the Context) is responsible for the lifetime of tensors and GPU resource cleanup.
68+
`gpu::KernelCode` contains the WGSL shader template plus metadata (workgroup size, precision, label, and entry point) that drive the kernel configuration.
69+
• The `gpu::createKernelAsync/gpu::createKernel` functions (within the Execution Flow) use the `gpu::Context`, `gpu::Bindings`, and `gpu::KernelCode` to configure and construct a `gpu::Kernel` that manages all the underlying GPU resources (buffers, bind groups, compute pipeline, etc.).
70+
`gpu::KernelCode`’s workgroup size (a `gpu::Shape`) defines the dispatch configuration, and the `gpu::Kernel` eventually uses the underlying `gpu::Array` (contains` WGPUBuffer, WGPUBufferUsage, size_t`) and `gpu::Shape` data from the created Tensor.
71+
72+
`gpu::Tensor` Ranks:
6473
Rank 0: Scalar
6574
Rank 1: Vector
6675
Rank 2: Matrix
6776
Rank 3: 3D Tensor (or Cube)
6877
Rank 4: 4D Tensor
69-
Rank ..: Higher Dimensional Tensors
70-
71-
72-
• The `gpu::Array` (which wraps a GPU buffer with usage and size) and the `gpu::Shape` (which defines dimensions and rank) are combined—via the creation process—to produce a `gpu::Tensor`.
73-
• A `gpu::TensorView` provides a non‑owning view into a slice of a `gpu::Tensor`. Ex. `TensorView view = {tensor, 0, 256};`
74-
• gpu::Bindings collect multiple Tensors (or TensorViews) along with view offset/size information for use in a kernel.
75-
• The gpu::TensorPool (managed by the Context) is responsible for the lifetime of tensors and GPU resource cleanup.
76-
• gpu::KernelCode contains the WGSL shader template plus metadata (workgroup size, precision, label, and entry point) that drive the kernel configuration.
77-
• The gpu::createKernelAsync/gpu::createKernel functions (within the Execution Flow) use the gpu::Context, gpu::Bindings, and gpu::KernelCode to configure and construct a gpu::Kernel that manages all the underlying GPU resources (buffers, bind groups, compute pipeline, etc.).
78-
• gpu::KernelCode’s workgroup size (a gpu::Shape) defines the dispatch configuration, and the gpu::Kernel eventually uses the underlying gpu::Array (contains WGPUBuffer, WGPUBufferUsage, size_t) and gpu::Shape data from the created Tensor.
78+
Rank (max 8): Higher Dimensional Tensors

0 commit comments

Comments
 (0)