1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-05 00:10:24 +08:00

feat(examples): add image_scale (#7)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
fumiama
2026-03-29 17:11:22 +08:00
committed by GitHub
parent 68ca8b5e2e
commit 6522bde914
123 changed files with 1074 additions and 163 deletions

View File

@@ -132,6 +132,15 @@ jobs:
ls -hl /tmp/sycl_linux
echo "/tmp/sycl_linux/bin" >> $GITHUB_PATH
- name: Install ocloc
run: |
wget -qO- https://repositories.intel.com/gpu/intel-graphics.key \
| sudo gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) unified" \
| sudo tee /etc/apt/sources.list.d/intel-gpu.list
sudo apt-get update -q
sudo apt-get install -y intel-ocloc libigdfcl2 libigc2
- name: Run go generate
run: |
go generate ./...

View File

@@ -8,6 +8,10 @@
Built on [purego](https://github.com/ebitengine/purego) and Windows syscall, gozel loads `ze_loader` at runtime via FFI, avoiding all C compiler dependencies. The entire API surface is auto-generated from the official Level Zero SDK headers, keeping bindings always in sync with upstream.
| Before Scaling (1272 x 855) | After Scaling (512 x 344) |
|:--:|:--:|
|![暖笺贺春.webp](examples/image_scale/暖笺贺春.webp)|![small.png](examples/image_scale/small.png)|
---
## Table of Contents
@@ -127,8 +131,9 @@ Test Passed!!!
| Example | Description | Source |
|---|---|---|
| **vadd** | Vector addition — GPU kernel launch, memory copy, validation | [examples/vadd](examples/vadd/) |
| **vadd_event** | Vector addition with event — GPU kernel launch, memory copy, validation | [examples/vadd_event](examples/vadd_event/) |
| **vadd** | Vector addition | [examples/vadd](examples/vadd/) |
| **vadd_event** | Vector addition with event | [examples/vadd_event](examples/vadd_event/) |
| **image_scale** | Scale image using hardware sampler | [examples/image_scale](examples/image_scale/) |
## The `ze` Package — High-Level API

View File

@@ -629,7 +629,7 @@ func scanTypedef(
if !redirect {
f.WriteString("type ")
f.WriteString(val)
f.WriteString(" uintptr\nconst (")
f.WriteString(" uint32\nconst (")
replaces = " " + val + " ="
} else {
_, _ = f.Seek(-1, io.SeekCurrent)

2
doc.go
View File

@@ -2,4 +2,4 @@
package gozel
//go:generate go run ./cmd/gen
//go:generate gofmt -w .
//go:generate gofmt -w -s .

View File

@@ -0,0 +1,60 @@
# Image Scaling — GPU Bilinear Resize with Sampler
Downscale an image on the GPU using Level Zero's native **image** and **sampler** objects. The sampler performs hardware-accelerated bilinear interpolation, producing a high-quality resized image in a single kernel dispatch.
## What It Does
1. Decodes an embedded WebP image (1272 × 855) and converts it to RGBA
2. Computes the target dimensions (capped at 512 px on the longest side)
3. Discovers a GPU device and prints its basic & compute properties
4. Creates a SPIR-V module from an OpenCL C kernel compiled offline
5. Uses `zeKernelSuggestGroupSize` to pick an optimal 2-D workgroup size
6. Allocates host/device memory and two Level Zero **image objects** (input & output)
7. Creates a **sampler** with clamp addressing and bilinear filtering
8. Executes three command lists via a command queue:
- **Pre**: copy host pixels → device buffer → input image
- **Compute**: launch the `scale` kernel
- **Post**: copy output image → device buffer → host memory
9. Writes the result to `small.png`
## Run
```bash
go run main.go
```
## Result
| Before Scaling (1272 × 855) | After Scaling (512 × 344) |
|:----------------------------:|:-------------------------:|
| ![input](暖笺贺春.webp) | ![output](small.png) |
### Console Output
```
=============== Image Information ===============
Image Format: webp
Image W/H ratio: 1.4877
Image Size: 1272 x 855
Scale to Image Size: 512 x 344
Scale ratio: 0.4025
Image Data Size: 144802 bytes
=============== Device Basic Properties ===============
Running on device: ID = 32103 , Name = Intel(R) Graphics @ 0.00 GHz.
=============== Device Compute Properties ===============
Max Group Size (X, Y, Z): (1024, 1024, 1024)
Max Group Count (X, Y, Z): (4294967295, 4294967295, 4294967295)
Max Total Group Size: 1024
Max Shared Local Memory: 65536
Subgroup Sizes: [8 16 32]
=============== Computation Configuration ===============
Group Size (X, Y, Z): (64, 4, 1)
Group Count (X, Y, Z): (8, 86, 1)
Total Elements (srcN, dstN): (4350240, 704512)
Source Buffer Size: 4248.28 KiB
Dest Buffer Size: 688.00 KiB
=============== Calculation Results ===============
GPU Execution Time: 1.579000 ms
GPU Throughput: 2.76 GiB/s
Test Passed!!!
```

View File

@@ -0,0 +1,19 @@
kernel void scale(
read_only image2d_t inputImg,
sampler_t smp,
write_only image2d_t outputImg)
{
uint x = get_global_id(0);
uint y = get_global_id(1);
uint outW = get_image_width(outputImg);
uint outH = get_image_height(outputImg);
float2 normCoord = (float2)(
(float)x / (float)outW,
(float)y / (float)outH
);
float4 pixel = read_imagef(inputImg, smp, normCoord);
write_imagef(outputImg, (int2)(x, y), pixel);
}

View File

@@ -0,0 +1,314 @@
// Package main demonstrates vector addition using the gozel Level Zero bindings.
package main
import (
"bytes"
_ "embed"
"fmt"
"image"
"image/draw"
"image/png"
"math"
"os"
"strconv"
"strings"
"time"
"unsafe"
_ "golang.org/x/image/webp"
"github.com/fumiama/gozel/gozel"
"github.com/fumiama/gozel/ze"
)
//go:generate ocloc compile -file main.cl -spv_only -options "-cl-mad-enable -cl-fast-relaxed-math -cl-finite-math-only -cl-single-precision-constant" -internal_options "-O3" -output main
//go:generate llvm-spirv -to-text main_.spv -o main.spt
//go:embed main_.spv
var kernelspv []byte
//go:embed 暖笺贺春.webp
var imagebytes []byte
func main() {
img, format, err := image.Decode(bytes.NewReader(imagebytes))
if err != nil {
panic(err)
}
bounds := img.Bounds()
width := bounds.Dx()
height := bounds.Dy()
ratio := float64(width) / float64(height)
imgrgba := image.NewRGBA(bounds)
draw.Draw(imgrgba, bounds, img, bounds.Min, draw.Src)
dstw, dsth := width, height
if dstw > 512 {
dstw = 512
dsth = int(float64(dstw) / ratio)
}
if dsth > 512 {
dsth = 512
dstw = int(float64(dsth) * ratio)
}
scaleRatio := float32(float64(dstw) / float64(width))
fmt.Println("=============== Image Information ===============")
fmt.Printf("%-28s %s\n", "Image Format:", format)
fmt.Printf("%-28s %.04f\n", "Image W/H ratio:", ratio)
fmt.Printf("%-28s %d x %d\n", "Image Size:", width, height)
fmt.Printf("%-28s %d x %d\n", "Scale to Image Size:", dstw, dsth)
fmt.Printf("%-28s %.04f\n", "Scale ratio:", scaleRatio)
fmt.Printf("%-28s %d bytes\n", "Image Data Size:", len(imagebytes))
gpus, err := ze.InitGPUDrivers()
if err != nil {
panic(err)
}
if len(gpus) == 0 {
panic("no gpu available")
}
gpu := gpus[0]
ctx, err := gpu.ContextCreate()
if err != nil {
panic(err)
}
devs, err := gpu.DeviceGet()
if err != nil {
panic(err)
}
if len(devs) == 0 {
panic("no device available")
}
dev := devs[0]
prop, err := dev.DeviceGetProperties()
if err != nil {
panic(err)
}
fmt.Println("=============== Device Basic Properties ===============")
name, _, _ := strings.Cut(string(prop.Name[:]), "\x00")
fmt.Println(
"Running on device: ID =", prop.Deviceid, ", Name =", name,
"@", strconv.FormatFloat(float64(prop.Coreclockrate)/1024/1024/1024, 'f', 2, 64), "GHz.",
)
cprop, err := dev.DeviceGetComputeProperties()
if err != nil {
panic(err)
}
fmt.Println("=============== Device Compute Properties ===============")
fmt.Printf("%-28s (%d, %d, %d)\n", "Max Group Size (X, Y, Z):", cprop.Maxgroupsizex, cprop.Maxgroupsizey, cprop.Maxgroupsizez)
fmt.Printf("%-28s (%d, %d, %d)\n", "Max Group Count (X, Y, Z):", cprop.Maxgroupcountx, cprop.Maxgroupcounty, cprop.Maxgroupcountz)
fmt.Printf("%-28s %d\n", "Max Total Group Size:", cprop.Maxtotalgroupsize)
fmt.Printf("%-28s %d\n", "Max Shared Local Memory:", cprop.Maxsharedlocalmemory)
fmt.Printf("%-28s %v\n", "Subgroup Sizes:", cprop.Subgroupsizes[:cprop.Numsubgroupsizes])
mod, err := ctx.ModuleCreate(dev, kernelspv)
if err != nil {
panic(err)
}
defer mod.Destroy()
krn, err := mod.KernelCreate("scale")
if err != nil {
panic(err)
}
defer krn.Destroy()
gX, gY, _, err := krn.SuggestGroupSize(uint32(dstw), uint32(dsth), 1)
if err != nil {
panic(err)
}
var (
X = uintptr(gX)
Y = uintptr(gY)
groupCountX = uint32(math.Ceil(float64(dstw) / float64(X)))
groupCountY = uint32(math.Ceil(float64(dsth) / float64(Y)))
srcN = uintptr(width * height * 4) // 4 for RGBA
dstN = X * uintptr(groupCountX) * Y * uintptr(groupCountY) * 4 // 4 for RGBA
srcbufsz = srcN * unsafe.Sizeof(uint8(0))
dstbufsz = dstN * unsafe.Sizeof(uint8(0))
)
fmt.Println("=============== Computation Configuration ===============")
fmt.Printf("%-28s (%d, %d, %d)\n", "Group Size (X, Y, Z):", X, Y, 1)
fmt.Printf("%-28s (%d, %d, %d)\n", "Group Count (X, Y, Z):", groupCountX, groupCountY, 1)
fmt.Printf("%-28s (%d, %d)\n", "Total Elements (srcN, dstN):", srcN, dstN)
fmt.Printf("%-28s %.02f KiB\n", "Source Buffer Size:", float64(srcbufsz)/1024)
fmt.Printf("%-28s %.02f KiB\n", "Dest Buffer Size:", float64(dstbufsz)/1024)
q, err := ctx.CommandQueueCreate(dev, gozel.ZE_COMMAND_QUEUE_MODE_DEFAULT)
if err != nil {
panic(err)
}
defer q.Destroy()
hbuf, err := ctx.MemAllocHost(srcbufsz, 1)
if err != nil {
panic(err)
}
defer ctx.MemFree(hbuf)
dbuf, err := ctx.MemAllocDevice(dev, srcbufsz, 1)
if err != nil {
panic(err)
}
defer ctx.MemFree(dbuf)
himg := unsafe.Slice((*uint8)(hbuf), srcN)
copy(himg, imgrgba.Pix)
rgbaFmt := gozel.ZeImageFormat{
Layout: gozel.ZE_IMAGE_FORMAT_LAYOUT_8_8_8_8,
Type: gozel.ZE_IMAGE_FORMAT_TYPE_UNORM, // UNORM: bilinear sampling returns float [0,1]
X: gozel.ZE_IMAGE_FORMAT_SWIZZLE_R,
Y: gozel.ZE_IMAGE_FORMAT_SWIZZLE_G,
Z: gozel.ZE_IMAGE_FORMAT_SWIZZLE_B,
W: gozel.ZE_IMAGE_FORMAT_SWIZZLE_A,
}
input, err := ctx.ImageCreate(dev, 0, rgbaFmt, uint64(width), uint32(height))
if err != nil {
panic(err)
}
defer input.Destroy()
smp, err := ctx.SamplerCreate(
dev, gozel.ZE_SAMPLER_ADDRESS_MODE_CLAMP,
gozel.ZE_SAMPLER_FILTER_MODE_LINEAR, 1,
)
if err != nil {
panic(err)
}
defer smp.Destroy()
output, err := ctx.ImageCreate(
dev, gozel.ZE_IMAGE_FLAG_KERNEL_WRITE,
rgbaFmt, uint64(dstw), uint32(dsth),
)
if err != nil {
panic(err)
}
defer output.Destroy()
err = krn.SetArgumentValue(0, input)
if err != nil {
panic(err)
}
err = krn.SetArgumentValue(1, smp)
if err != nil {
panic(err)
}
err = krn.SetArgumentValue(2, output)
if err != nil {
panic(err)
}
err = krn.SetGroupSize(uint32(X), uint32(Y), 1)
if err != nil {
panic(err)
}
lstpre, err := ctx.CommandListCreate(dev)
if err != nil {
panic(err)
}
defer lstpre.Destroy()
err = lstpre.AppendMemoryCopy(dbuf, hbuf, srcbufsz, 0)
if err != nil {
panic(err)
}
err = lstpre.AppendBarrier(0)
if err != nil {
panic(err)
}
err = lstpre.AppendImageCopyFromMemory(input, dbuf, nil, 0)
if err != nil {
panic(err)
}
err = lstpre.AppendBarrier(0)
if err != nil {
panic(err)
}
err = lstpre.Close()
if err != nil {
panic(err)
}
lstcalc, err := ctx.CommandListCreate(dev)
if err != nil {
panic(err)
}
defer lstcalc.Destroy()
err = lstcalc.AppendLaunchKernel(krn, &gozel.ZeGroupCount{
Groupcountx: groupCountX, Groupcounty: groupCountY, Groupcountz: 1,
}, 0)
if err != nil {
panic(err)
}
err = lstcalc.AppendBarrier(0)
if err != nil {
panic(err)
}
err = lstcalc.Close()
if err != nil {
panic(err)
}
lstpost, err := ctx.CommandListCreate(dev)
if err != nil {
panic(err)
}
defer lstpost.Destroy()
err = lstpost.AppendImageCopyToMemory(dbuf, output, nil, 0)
if err != nil {
panic(err)
}
err = lstpost.AppendMemoryCopy(hbuf, dbuf, dstbufsz, 0)
if err != nil {
panic(err)
}
err = lstpost.Close()
if err != nil {
panic(err)
}
start := time.Now()
err = q.ExecuteCommandLists(lstpre, lstcalc, lstpost)
if err != nil {
panic(err)
}
err = q.Synchronize(math.MaxUint64)
if err != nil {
panic(err)
}
elapsed := time.Since(start)
fmt.Println("=============== Calculation Results ===============")
fmt.Printf("%-28s %.6f ms\n", "GPU Execution Time:", elapsed.Seconds()*1000)
fmt.Printf("%-28s %.2f GiB/s\n", "GPU Throughput:", float64(srcbufsz)/elapsed.Seconds()/1e9)
newimgrgba := image.NewRGBA(image.Rect(0, 0, dstw, dsth))
copy(newimgrgba.Pix, himg)
file, err := os.Create("small.png")
if err != nil {
panic(err)
}
defer file.Close()
err = png.Encode(file, newimgrgba)
if err != nil {
panic(err)
}
fmt.Println("Test Passed!!!")
}

View File

@@ -0,0 +1,119 @@
119734787 65536 393230 61 0
2 Capability Addresses
2 Capability Linkage
2 Capability Kernel
2 Capability Int64
2 Capability ImageBasic
5 ExtInstImport 1 "OpenCL.std"
3 MemoryModel 2 2
6 EntryPoint 6 53 "scale" 5
16 String 59 "kernel_arg_type.scale.image2d_t,sampler_t,image2d_t,"
10 String 60 "kernel_arg_type_qual.scale.,,,"
3 Source 3 102000
11 Name 5 "__spirv_BuiltInGlobalInvocationId"
4 Name 11 "scale"
5 Name 12 "inputImg"
3 Name 13 "smp"
5 Name 14 "outputImg"
4 Name 15 "entry"
4 Name 21 "call"
4 Name 23 "conv"
4 Name 26 "call1"
4 Name 27 "conv2"
4 Name 30 "call31"
4 Name 31 "call3"
4 Name 32 "call42"
4 Name 33 "call4"
4 Name 35 "conv5"
4 Name 36 "conv6"
3 Name 37 "div"
4 Name 40 "vecinit"
4 Name 41 "conv7"
4 Name 42 "conv8"
4 Name 43 "div9"
5 Name 44 "vecinit10"
7 Name 46 "TempSampledImage"
4 Name 49 "call11"
5 Name 51 "vecinit13"
5 Name 52 "vecinit14"
5 Name 54 "inputImg"
3 Name 55 "smp"
5 Name 56 "outputImg"
13 Decorate 5 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
3 Decorate 5 Constant
4 Decorate 5 BuiltIn 28
6 Decorate 11 LinkageAttributes "scale" Export
4 Decorate 37 FPFastMathMode 16
4 Decorate 43 FPFastMathMode 16
4 TypeInt 2 64 0
4 TypeInt 22 32 0
5 Constant 2 18 0 0
4 Constant 22 29 0
4 TypeVector 3 2 3
4 TypePointer 4 1 3
2 TypeVoid 6
10 TypeImage 7 6 1 0 0 0 0 0 0
2 TypeSampler 8
10 TypeImage 9 6 1 0 0 0 0 0 1
6 TypeFunction 10 6 7 8 9
2 TypeBool 19
4 TypeVector 28 22 2
3 TypeFloat 34 32
4 TypeVector 38 34 2
3 TypeSampledImage 45 7
4 TypeVector 47 34 4
4 Variable 4 5 1
3 ConstantTrue 19 20
3 Undef 38 39
4 Constant 34 48 0
3 Undef 28 50
5 Function 6 11 0 10
3 FunctionParameter 7 12
3 FunctionParameter 8 13
3 FunctionParameter 9 14
2 Label 15
6 Load 3 16 5 2 32
5 CompositeExtract 2 17 16 0
6 Select 2 21 20 17 18
4 UConvert 22 23 21
6 Load 3 24 5 2 32
5 CompositeExtract 2 25 24 1
6 Select 2 26 20 25 18
4 UConvert 22 27 26
5 ImageQuerySizeLod 28 30 14 29
5 CompositeExtract 22 31 30 0
5 ImageQuerySizeLod 28 32 14 29
5 CompositeExtract 22 33 32 1
4 ConvertUToF 34 35 23
4 ConvertUToF 34 36 31
5 FDiv 34 37 35 36
6 CompositeInsert 38 40 37 39 0
4 ConvertUToF 34 41 27
4 ConvertUToF 34 42 33
5 FDiv 34 43 41 42
6 CompositeInsert 38 44 43 40 1
5 SampledImage 45 46 12 13
7 ImageSampleExplicitLod 47 49 46 44 2 48
6 CompositeInsert 28 51 23 50 0
6 CompositeInsert 28 52 27 51 1
4 ImageWrite 14 52 49
1 Return
1 FunctionEnd
5 Function 6 53 0 10
3 FunctionParameter 7 54
3 FunctionParameter 8 55
3 FunctionParameter 9 56
2 Label 57
7 FunctionCall 6 58 11 54 55 56
1 Return
1 FunctionEnd

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

View File

@@ -0,0 +1,21 @@
# Quick Start — Device Enumeration
The simplest gozel example: initialize the Level Zero runtime, enumerate all available GPU drivers and their devices, and print device names.
## What It Does
- Initializes Level Zero and retrieves all GPU driver handles
- Iterates over devices under each driver, queries and prints device properties (name)
## Run
```bash
go run main.go
```
## Sample Output
```
Found 1 GPU driver(s)
Device: Intel(R) Graphics
```

48
examples/vadd/README.md Normal file
View File

@@ -0,0 +1,48 @@
# Vector Addition — Command Queue
> ![Tips]
> **SYCL** is used to write this kernel, which is not a common practice.
> Please also have a look at the **OpenCL** kernel examples like [image_scale](../image_scale/).
A classic GPU compute example: perform element-wise addition of two large float32 vectors on the GPU, then validate the result against a CPU reference.
## What It Does
1. Discovers a GPU device and prints its basic & compute properties
2. Allocates host and device memory for two float32 vectors (256 MiB each)
3. Fills both vectors with random values and copies them to device memory
4. Loads a SPIR-V kernel (`vector_add`) that computes `a[i] += b[i]` in parallel
5. Launches the kernel via a **command queue** with explicit command lists (pre-copy → compute → post-copy)
6. Reads back the results and validates every element against the CPU reference
7. Reports GPU vs. CPU execution time and throughput
## Run
```bash
go run main.go
```
## Sample Output
```
=============== Device Basic Properties ===============
Running on device: ID = 32103 , Name = Intel(R) Graphics @ 0.00 GHz.
=============== Device Compute Properties ===============
Max Group Size (X, Y, Z): (1024, 1024, 1024)
Max Group Count (X, Y, Z): (4294967295, 4294967295, 4294967295)
Max Total Group Size: 1024
Max Shared Local Memory: 65536
Subgroup Sizes: [8 16 32]
=============== Computation Configuration ===============
Group Size (X, Y, Z): (1024, 1, 1)
Group Count: 65536
Total Elements (N): 67108864
Buffer Size: 256 MiB
=============== Calculation Results ===============
GPU Execution Time: 53.858600 ms
GPU Throughput: 4.98 GiB/s
=============== Validation Results ===============
CPU Execution Time: 65.882900 ms
CPU Throughput: 4.07 GiB/s
Test Passed!!!
```

View File

@@ -16,10 +16,11 @@ import (
"github.com/fumiama/gozel/ze"
)
//go:generate clang++ -fsycl -fsycl-device-only -fsycl-targets=spirv64 -Xclang -emit-llvm-bc main.cpp -o device_kern.bc
//go:generate sycl-post-link -symbols -split=auto -o device_kern.table device_kern.bc
//go:generate llvm-spirv -o main.spv device_kern_0.bc
//go:generate clang++ -fsycl -fsycl-device-only -fno-sycl-instrument-device-code -fsycl-targets=spirv64 -Xclang -emit-llvm-bc main.cpp -o device_kern.bc
//go:generate sycl-post-link -symbols -split=auto -emit-param-info -properties -o device_kern.table device_kern.bc
//go:generate llvm-spirv --sycl-opt -o main.spv device_kern_0.bc
//go:generate clang++ -target spirv64-unknown-unknown -S -emit-llvm -x ir device_kern_0.bc -o main.ll
//go:generate llvm-spirv -to-text main.spv -o main.spt
//go:embed main.spv
var kernelspv []byte

79
examples/vadd/main.spt Normal file
View File

@@ -0,0 +1,79 @@
119734787 66560 393230 34 0
2 Capability Addresses
2 Capability Linkage
2 Capability Kernel
2 Capability Int64
5 ExtInstImport 1 "OpenCL.std"
3 MemoryModel 2 2
12 EntryPoint 6 29 "__sycl_kernel_vector_add" 5 6
3 ExecutionMode 29 31
3 Source 4 100000
11 Name 5 "__spirv_BuiltInGlobalInvocationId"
9 Name 6 "__spirv_BuiltInGlobalOffset"
9 Name 11 "__sycl_kernel_vector_add"
13 Decorate 5 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
3 Decorate 5 Constant
4 Decorate 5 BuiltIn 28
4 Decorate 5 Alignment 32
11 Decorate 6 LinkageAttributes "__spirv_BuiltInGlobalOffset" Import
3 Decorate 6 Constant
4 Decorate 6 BuiltIn 33
4 Decorate 6 Alignment 32
11 Decorate 11 LinkageAttributes "__sycl_kernel_vector_add" Export
4 Decorate 12 FuncParamAttr 5
4 Decorate 12 Alignment 4
4 Decorate 13 FuncParamAttr 5
4 Decorate 13 FuncParamAttr 6
4 Decorate 13 Alignment 4
4 Decorate 30 FuncParamAttr 5
4 Decorate 30 Alignment 4
4 Decorate 31 FuncParamAttr 5
4 Decorate 31 FuncParamAttr 6
4 Decorate 31 Alignment 4
4 TypeInt 2 64 0
5 Constant 2 21 2147483648 0
4 TypeVector 3 2 3
4 TypePointer 4 5 3
2 TypeVoid 7
3 TypeFloat 8 32
4 TypePointer 9 5 8
5 TypeFunction 10 7 9 9
4 TypePointer 15 5 2
2 TypeBool 22
4 Variable 4 5 5
4 Variable 4 6 5
5 Function 7 11 0 10
3 FunctionParameter 9 12
3 FunctionParameter 9 13
2 Label 14
4 Bitcast 15 16 5
6 Load 2 17 16 2 32
4 Bitcast 15 18 6
6 Load 2 19 18 2 32
5 ISub 2 20 17 19
5 ULessThan 22 23 20 21
5 InBoundsPtrAccessChain 9 24 13 20
6 Load 8 25 24 2 4
5 InBoundsPtrAccessChain 9 26 12 20
6 Load 8 27 26 2 4
5 FAdd 8 28 27 25
5 Store 26 28 2 4
1 Return
1 FunctionEnd
5 Function 7 29 0 10
3 FunctionParameter 9 30
3 FunctionParameter 9 31
2 Label 32
6 FunctionCall 7 33 11 30 31
1 Return
1 FunctionEnd

View File

@@ -0,0 +1,61 @@
# Vector Addition — Immediate Command List with Events
> ![Tips]
> **SYCL** is used to write this kernel, which is not a common practice.
> Please also have a look at the **OpenCL** kernel examples like [image_scale](../image_scale/).
The same vector addition workload as the `vadd` example, but driven by an **immediate command list** and **events** instead of explicit command queues. This demonstrates fine-grained dependency tracking: memory copies signal events, and the kernel launch waits on those events before executing.
## What It Does
1. Discovers a GPU device and prints its basic & compute properties
2. Allocates host and device memory for two float32 vectors (256 MiB each)
3. Fills both vectors with random values
4. Loads a SPIR-V kernel (`vector_add`) that computes `a[i] += b[i]` in parallel
5. Creates an **event pool** with 3 events to express data-flow dependencies
6. Submits all work through a single **immediate command list**:
- Two H→D copies, each signaling its own event
- Kernel launch that **waits** on both copy events before executing
- D→H copy that waits on the kernel event
7. Synchronizes via `HostSynchronize` on the immediate command list
8. Validates every element against the CPU reference
## Key Difference from `vadd`
| Aspect | `vadd` | `vadd_event` |
|--------|--------|-------------|
| Submission | 3 separate command lists executed on a command queue | 1 immediate command list |
| Synchronization | `zeCommandQueueSynchronize` | `zeCommandListHostSynchronize` |
| Dependencies | Implicit via command list ordering + barriers | Explicit via events (wait lists) |
## Run
```bash
go run main.go
```
## Sample Output
```
=============== Device Basic Properties ===============
Running on device: ID = 32103 , Name = Intel(R) Graphics @ 0.00 GHz.
=============== Device Compute Properties ===============
Max Group Size (X, Y, Z): (1024, 1024, 1024)
Max Group Count (X, Y, Z): (4294967295, 4294967295, 4294967295)
Max Total Group Size: 1024
Max Shared Local Memory: 65536
Num Subgroup Sizes: 3
Subgroup Sizes: [8 16 32 0 0 0 0 0]
=============== Computation Configuration ===============
Group Size (X, Y, Z): (1024, 1, 1)
Group Count: 65536
Total Elements (N): 67108864
Buffer Size: 256 MiB
=============== Calculation Results ===============
GPU Execution Time: 51.768500 ms
GPU Throughput: 5.19 GiB/s
=============== Validation Results ===============
CPU Execution Time: 38.237400 ms
CPU Throughput: 7.02 GiB/s
Test Passed!!!
```

View File

@@ -16,10 +16,11 @@ import (
"github.com/fumiama/gozel/ze"
)
//go:generate clang++ -fsycl -fsycl-device-only -fsycl-targets=spirv64 -Xclang -emit-llvm-bc main.cpp -o device_kern.bc
//go:generate sycl-post-link -symbols -split=auto -o device_kern.table device_kern.bc
//go:generate llvm-spirv -o main.spv device_kern_0.bc
//go:generate clang++ -fsycl -fsycl-device-only -fno-sycl-instrument-device-code -fsycl-targets=spirv64 -Xclang -emit-llvm-bc main.cpp -o device_kern.bc
//go:generate sycl-post-link -symbols -split=auto -emit-param-info -properties -o device_kern.table device_kern.bc
//go:generate llvm-spirv --sycl-opt -o main.spv device_kern_0.bc
//go:generate clang++ -target spirv64-unknown-unknown -S -emit-llvm -x ir device_kern_0.bc -o main.ll
//go:generate llvm-spirv -to-text main.spv -o main.spt
//go:embed main.spv
var kernelspv []byte

View File

@@ -0,0 +1,79 @@
119734787 66560 393230 34 0
2 Capability Addresses
2 Capability Linkage
2 Capability Kernel
2 Capability Int64
5 ExtInstImport 1 "OpenCL.std"
3 MemoryModel 2 2
12 EntryPoint 6 29 "__sycl_kernel_vector_add" 5 6
3 ExecutionMode 29 31
3 Source 4 100000
11 Name 5 "__spirv_BuiltInGlobalInvocationId"
9 Name 6 "__spirv_BuiltInGlobalOffset"
9 Name 11 "__sycl_kernel_vector_add"
13 Decorate 5 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
3 Decorate 5 Constant
4 Decorate 5 BuiltIn 28
4 Decorate 5 Alignment 32
11 Decorate 6 LinkageAttributes "__spirv_BuiltInGlobalOffset" Import
3 Decorate 6 Constant
4 Decorate 6 BuiltIn 33
4 Decorate 6 Alignment 32
11 Decorate 11 LinkageAttributes "__sycl_kernel_vector_add" Export
4 Decorate 12 FuncParamAttr 5
4 Decorate 12 Alignment 4
4 Decorate 13 FuncParamAttr 5
4 Decorate 13 FuncParamAttr 6
4 Decorate 13 Alignment 4
4 Decorate 30 FuncParamAttr 5
4 Decorate 30 Alignment 4
4 Decorate 31 FuncParamAttr 5
4 Decorate 31 FuncParamAttr 6
4 Decorate 31 Alignment 4
4 TypeInt 2 64 0
5 Constant 2 21 2147483648 0
4 TypeVector 3 2 3
4 TypePointer 4 5 3
2 TypeVoid 7
3 TypeFloat 8 32
4 TypePointer 9 5 8
5 TypeFunction 10 7 9 9
4 TypePointer 15 5 2
2 TypeBool 22
4 Variable 4 5 5
4 Variable 4 6 5
5 Function 7 11 0 10
3 FunctionParameter 9 12
3 FunctionParameter 9 13
2 Label 14
4 Bitcast 15 16 5
6 Load 2 17 16 2 32
4 Bitcast 15 18 6
6 Load 2 19 18 2 32
5 ISub 2 20 17 19
5 ULessThan 22 23 20 21
5 InBoundsPtrAccessChain 9 24 13 20
6 Load 8 25 24 2 4
5 InBoundsPtrAccessChain 9 26 12 20
6 Load 8 27 26 2 4
5 FAdd 8 28 27 25
5 Store 26 28 2 4
1 Return
1 FunctionEnd
5 Function 7 29 0 10
3 FunctionParameter 9 30
3 FunctionParameter 9 31
2 Label 32
6 FunctionCall 7 33 11 30 31
1 Return
1 FunctionEnd

5
go.mod
View File

@@ -2,4 +2,7 @@ module github.com/fumiama/gozel
go 1.26.1
require github.com/ebitengine/purego v0.10.0
require (
github.com/ebitengine/purego v0.10.0
golang.org/x/image v0.38.0
)

2
go.sum
View File

@@ -1,2 +1,4 @@
github.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/ISU=
github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
golang.org/x/image v0.38.0 h1:5l+q+Y9JDC7mBOMjo4/aPhMDcxEptsX+Tt3GgRQRPuE=
golang.org/x/image v0.38.0/go.mod h1:/3f6vaXC+6CEanU4KJxbcUZyEePbyKbaLoDOe4ehFYY=

View File

@@ -21,7 +21,7 @@ import (
const ZE_CACHELINE_SIZE_EXT_NAME = "ZE_extension_device_cache_line_size"
// ZeDeviceCacheLineSizeExtVersion (ze_device_cache_line_size_ext_version_t) CacheLine Size Extension Version(s)
type ZeDeviceCacheLineSizeExtVersion uintptr
type ZeDeviceCacheLineSizeExtVersion uint32
const (
ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_1_0 ZeDeviceCacheLineSizeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_EU_COUNT_EXT_NAME = "ZE_extension_eu_count"
// ZeEuCountExtVersion (ze_eu_count_ext_version_t) EU Count Extension Version(s)
type ZeEuCountExtVersion uintptr
type ZeEuCountExtVersion uint32
const (
ZE_EU_COUNT_EXT_VERSION_1_0 ZeEuCountExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EU_COUNT_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_PCI_PROPERTIES_EXT_NAME = "ZE_extension_pci_properties"
// ZePciPropertiesExtVersion (ze_pci_properties_ext_version_t) PCI Properties Extension Version(s)
type ZePciPropertiesExtVersion uintptr
type ZePciPropertiesExtVersion uint32
const (
ZE_PCI_PROPERTIES_EXT_VERSION_1_0 ZePciPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_PCI_PROPERTIES_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_RTAS_EXT_NAME = "ZE_extension_rtas"
// ZeRtasBuilderExtVersion (ze_rtas_builder_ext_version_t) Ray Tracing Acceleration Structure Builder Extension Version(s)
type ZeRtasBuilderExtVersion uintptr
type ZeRtasBuilderExtVersion uint32
const (
ZE_RTAS_BUILDER_EXT_VERSION_1_0 ZeRtasBuilderExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RTAS_BUILDER_EXT_VERSION_1_0 version 1.0
@@ -46,7 +46,7 @@ const (
// / @details
// / - This is an opaque ray tracing acceleration structure format
// / identifier.
type ZeRtasFormatExt uintptr
type ZeRtasFormatExt uint32
const (
ZE_RTAS_FORMAT_EXT_INVALID ZeRtasFormatExt = 0x0 // ZE_RTAS_FORMAT_EXT_INVALID Invalid acceleration structure format code
@@ -141,7 +141,7 @@ const (
// / - Higher ray tracing performance can be achieved by using a high-quality
// / build, but acceleration structure build performance might be
// / significantly reduced.
type ZeRtasBuilderBuildQualityHintExt uintptr
type ZeRtasBuilderBuildQualityHintExt uint32
const (
ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_LOW ZeRtasBuilderBuildQualityHintExt = 0 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_LOW build low-quality acceleration structure (fast)
@@ -152,7 +152,7 @@ const (
)
// ZeRtasBuilderGeometryTypeExt (ze_rtas_builder_geometry_type_ext_t) Ray tracing acceleration structure builder geometry type
type ZeRtasBuilderGeometryTypeExt uintptr
type ZeRtasBuilderGeometryTypeExt uint32
const (
ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES ZeRtasBuilderGeometryTypeExt = 0 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES triangle mesh geometry type
@@ -173,7 +173,7 @@ type ZeRtasBuilderPackedGeometryTypeExt uint8
// / - Specifies the format of data buffer elements.
// / - Data buffers may contain instancing transform matrices, triangle/quad
// / vertex indices, etc...
type ZeRtasBuilderInputDataFormatExt uintptr
type ZeRtasBuilderInputDataFormatExt uint32
const (
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 ZeRtasBuilderInputDataFormatExt = 0 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 3-component float vector (see ::ze_rtas_float3_ext_t)

View File

@@ -23,7 +23,7 @@ import (
const ZE_RTAS_BUILDER_EXP_NAME = "ZE_experimental_rtas_builder"
// ZeRtasBuilderExpVersion (ze_rtas_builder_exp_version_t) Ray Tracing Acceleration Structure Builder Extension Version(s)
type ZeRtasBuilderExpVersion uintptr
type ZeRtasBuilderExpVersion uint32
const (
ZE_RTAS_BUILDER_EXP_VERSION_1_0 ZeRtasBuilderExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RTAS_BUILDER_EXP_VERSION_1_0 version 1.0
@@ -46,7 +46,7 @@ const (
// / @details
// / - This is an opaque ray tracing acceleration structure format
// / identifier.
type ZeRtasFormatExp uintptr
type ZeRtasFormatExp uint32
const (
ZE_RTAS_FORMAT_EXP_INVALID ZeRtasFormatExp = 0 // ZE_RTAS_FORMAT_EXP_INVALID Invalid acceleration structure format
@@ -141,7 +141,7 @@ const (
// / - Higher ray tracing performance can be achieved by using a high-quality
// / build, but acceleration structure build performance might be
// / significantly reduced.
type ZeRtasBuilderBuildQualityHintExp uintptr
type ZeRtasBuilderBuildQualityHintExp uint32
const (
ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW ZeRtasBuilderBuildQualityHintExp = 0 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW build low-quality acceleration structure (fast)
@@ -152,7 +152,7 @@ const (
)
// ZeRtasBuilderGeometryTypeExp (ze_rtas_builder_geometry_type_exp_t) Ray tracing acceleration structure builder geometry type
type ZeRtasBuilderGeometryTypeExp uintptr
type ZeRtasBuilderGeometryTypeExp uint32
const (
ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES ZeRtasBuilderGeometryTypeExp = 0 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES triangle mesh geometry type
@@ -173,7 +173,7 @@ type ZeRtasBuilderPackedGeometryTypeExp uint8
// / - Specifies the format of data buffer elements.
// / - Data buffers may contain instancing transform matrices, triangle/quad
// / vertex indices, etc...
type ZeRtasBuilderInputDataFormatExp uintptr
type ZeRtasBuilderInputDataFormatExp uint32
const (
ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 ZeRtasBuilderInputDataFormatExp = 0 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 3-component float vector (see ::ze_rtas_float3_exp_t)

View File

@@ -21,7 +21,7 @@ import (
const ZE_SRGB_EXT_NAME = "ZE_extension_srgb"
// ZeSrgbExtVersion (ze_srgb_ext_version_t) sRGB Extension Version(s)
type ZeSrgbExtVersion uintptr
type ZeSrgbExtVersion uint32
const (
ZE_SRGB_EXT_VERSION_1_0 ZeSrgbExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SRGB_EXT_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_BANDWIDTH_PROPERTIES_EXP_NAME = "ZE_experimental_bandwidth_properties"
// ZeBandwidthPropertiesExpVersion (ze_bandwidth_properties_exp_version_t) Bandwidth Extension Version(s)
type ZeBandwidthPropertiesExpVersion uintptr
type ZeBandwidthPropertiesExpVersion uint32
const (
ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 ZeBandwidthPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 version 1.0

View File

@@ -17,7 +17,7 @@ package gozel
const ZE_BFLOAT16_CONVERSIONS_EXT_NAME = "ZE_extension_bfloat16_conversions"
// ZeBfloat16ConversionsExtVersion (ze_bfloat16_conversions_ext_version_t) Bfloat16 Conversions Extension Version(s)
type ZeBfloat16ConversionsExtVersion uintptr
type ZeBfloat16ConversionsExtVersion uint32
const (
ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 ZeBfloat16ConversionsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_BINDLESS_IMAGE_EXP_NAME = "ZE_experimental_bindless_image"
// ZeBindlessImageExpVersion (ze_bindless_image_exp_version_t) Bindless Image Extension Version(s)
type ZeBindlessImageExpVersion uintptr
type ZeBindlessImageExpVersion uint32
const (
ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 ZeBindlessImageExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_CACHE_RESERVATION_EXT_NAME = "ZE_extension_cache_reservation"
// ZeCacheReservationExtVersion (ze_cache_reservation_ext_version_t) Cache_Reservation Extension Version(s)
type ZeCacheReservationExtVersion uintptr
type ZeCacheReservationExtVersion uint32
const (
ZE_CACHE_RESERVATION_EXT_VERSION_1_0 ZeCacheReservationExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_CACHE_RESERVATION_EXT_VERSION_1_0 version 1.0
@@ -33,7 +33,7 @@ const (
)
// ZeCacheExtRegion (ze_cache_ext_region_t) Cache Reservation Region
type ZeCacheExtRegion uintptr
type ZeCacheExtRegion uint32
const (
ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT ZeCacheExtRegion = 0 // ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT [DEPRECATED] utilize driver default scheme. Use

View File

@@ -55,7 +55,7 @@ const (
)
// ZeCommandQueueMode (ze_command_queue_mode_t) Supported command queue modes
type ZeCommandQueueMode uintptr
type ZeCommandQueueMode uint32
const (
ZE_COMMAND_QUEUE_MODE_DEFAULT ZeCommandQueueMode = 0 // ZE_COMMAND_QUEUE_MODE_DEFAULT implicit default behavior; uses driver-based heuristics
@@ -72,7 +72,7 @@ const (
)
// ZeCommandQueuePriority (ze_command_queue_priority_t) Supported command queue priorities
type ZeCommandQueuePriority uintptr
type ZeCommandQueuePriority uint32
const (
ZE_COMMAND_QUEUE_PRIORITY_NORMAL ZeCommandQueuePriority = 0 // ZE_COMMAND_QUEUE_PRIORITY_NORMAL [default] normal priority

View File

@@ -23,7 +23,7 @@ import (
const ZE_COMMAND_LIST_CLONE_EXP_NAME = "ZE_experimental_command_list_clone"
// ZeCommandListCloneExpVersion (ze_command_list_clone_exp_version_t) Command List Clone Extension Version(s)
type ZeCommandListCloneExpVersion uintptr
type ZeCommandListCloneExpVersion uint32
const (
ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 ZeCommandListCloneExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 version 1.0

View File

@@ -104,7 +104,7 @@ func ZE_BIT[T ~int | ~uint32 | ~uint64 | ~uintptr](_i T) T {
}
// ZeResult (ze_result_t) Defines Return/Error codes
type ZeResult uintptr
type ZeResult uint32
const (
ZE_RESULT_SUCCESS ZeResult = 0 // ZE_RESULT_SUCCESS [Core] success
@@ -206,7 +206,7 @@ const (
)
// ZeStructureType (ze_structure_type_t) Defines structure types
type ZeStructureType uintptr
type ZeStructureType uint32
const (
ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES ZeStructureType = 0x1 // ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES ::ze_driver_properties_t
@@ -348,7 +348,7 @@ const (
)
// ZeBandwidthUnit (ze_bandwidth_unit_t) Bandwidth unit
type ZeBandwidthUnit uintptr
type ZeBandwidthUnit uint32
const (
ZE_BANDWIDTH_UNIT_UNKNOWN ZeBandwidthUnit = 0 // ZE_BANDWIDTH_UNIT_UNKNOWN The unit used for bandwidth is unknown
@@ -359,7 +359,7 @@ const (
)
// ZeLatencyUnit (ze_latency_unit_t) Latency unit
type ZeLatencyUnit uintptr
type ZeLatencyUnit uint32
const (
ZE_LATENCY_UNIT_UNKNOWN ZeLatencyUnit = 0 // ZE_LATENCY_UNIT_UNKNOWN The unit used for latency is unknown

View File

@@ -543,7 +543,7 @@ func ZeCommandListAppendMemoryPrefetch(
}
// ZeMemoryAdvice (ze_memory_advice_t) Supported memory advice hints
type ZeMemoryAdvice uintptr
type ZeMemoryAdvice uint32
const (
ZE_MEMORY_ADVICE_SET_READ_MOSTLY ZeMemoryAdvice = 0 // ZE_MEMORY_ADVICE_SET_READ_MOSTLY hint that memory will be read from frequently and written to rarely

View File

@@ -21,7 +21,7 @@ import (
const ZE_EVENT_POOL_COUNTER_BASED_EXP_NAME = "ZE_experimental_event_pool_counter_based"
// ZeEventPoolCounterBasedExpVersion (ze_event_pool_counter_based_exp_version_t) Counter-based Event Pools Extension Version(s)
type ZeEventPoolCounterBasedExpVersion uintptr
type ZeEventPoolCounterBasedExpVersion uint32
const (
ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 ZeEventPoolCounterBasedExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 version 1.0

View File

@@ -138,7 +138,7 @@ func ZeDeviceGetSubDevices(
}
// ZeDeviceType (ze_device_type_t) Supported device types
type ZeDeviceType uintptr
type ZeDeviceType uint32
const (
ZE_DEVICE_TYPE_GPU ZeDeviceType = 1 // ZE_DEVICE_TYPE_GPU Graphics Processing Unit

View File

@@ -21,7 +21,7 @@ import (
const ZE_DEVICE_LUID_EXT_NAME = "ZE_extension_device_luid"
// ZeDeviceLuidExtVersion (ze_device_luid_ext_version_t) Device Local Identifier (LUID) Extension Version(s)
type ZeDeviceLuidExtVersion uintptr
type ZeDeviceLuidExtVersion uint32
const (
ZE_DEVICE_LUID_EXT_VERSION_1_0 ZeDeviceLuidExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_LUID_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_DEVICE_VECTOR_SIZES_EXT_NAME = "ZE_extension_device_vector_sizes"
// ZeDeviceVectorSizesExtVersion (ze_device_vector_sizes_ext_version_t) Device Vector Sizes Query Extension Version(s)
type ZeDeviceVectorSizesExtVersion uintptr
type ZeDeviceVectorSizesExtVersion uint32
const (
ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 ZeDeviceVectorSizesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_DEVICE_IP_VERSION_EXT_NAME = "ZE_extension_device_ip_version"
// ZeDeviceIpVersionVersion (ze_device_ip_version_version_t) Device IP Version Extension Version(s)
type ZeDeviceIpVersionVersion uintptr
type ZeDeviceIpVersionVersion uint32
const (
ZE_DEVICE_IP_VERSION_VERSION_1_0 ZeDeviceIpVersionVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_IP_VERSION_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_device_usablemem_size_properties"
// ZeDeviceUsablememSizePropertiesExtVersion (ze_device_usablemem_size_properties_ext_version_t) Device Usable Mem Size Extension Version(s)
type ZeDeviceUsablememSizePropertiesExtVersion uintptr
type ZeDeviceUsablememSizePropertiesExtVersion uint32
const (
ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 ZeDeviceUsablememSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 version 1.0

View File

@@ -211,7 +211,7 @@ func ZeInitDrivers(
// / @details
// / - API versions contain major and minor attributes, use
// / ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION
type ZeApiVersion uintptr
type ZeApiVersion uint32
const (
ZE_API_VERSION_1_0 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_API_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_DRIVER_DDI_HANDLES_EXT_NAME = "ZE_extension_driver_ddi_handles"
// ZeDriverDdiHandlesExtVersion (ze_driver_ddi_handles_ext_version_t) Driver Direct Device Interface (DDI) Handles Extension Version(s)
type ZeDriverDdiHandlesExtVersion uintptr
type ZeDriverDdiHandlesExtVersion uint32
const (
ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_0 ZeDriverDdiHandlesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME = "ZE_extension_event_query_kernel_timestamps"
// ZeEventQueryKernelTimestampsExtVersion (ze_event_query_kernel_timestamps_ext_version_t) Event Query Kernel Timestamps Extension Version(s)
type ZeEventQueryKernelTimestampsExtVersion uintptr
type ZeEventQueryKernelTimestampsExtVersion uint32
const (
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 ZeEventQueryKernelTimestampsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME = "ZE_experimental_event_query_timestamps"
// ZeEventQueryTimestampsExpVersion (ze_event_query_timestamps_exp_version_t) Event Query Timestamps Extension Version(s)
type ZeEventQueryTimestampsExpVersion uintptr
type ZeEventQueryTimestampsExpVersion uint32
const (
ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 ZeEventQueryTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME = "ZE_extension_external_memmap_sysmem"
// ZeExternalMemmapSysmemExtVersion (ze_external_memmap_sysmem_ext_version_t) External Memory Mapping Extension Version(s)
type ZeExternalMemmapSysmemExtVersion uintptr
type ZeExternalMemmapSysmemExtVersion uint32
const (
ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 ZeExternalMemmapSysmemExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_EXTERNAL_SEMAPHORES_EXTENSION_NAME = "ZE_extension_external_semaphores"
// ZeExternalSemaphoreExtVersion (ze_external_semaphore_ext_version_t) External Semaphores Extension Version
type ZeExternalSemaphoreExtVersion uintptr
type ZeExternalSemaphoreExtVersion uint32
const (
ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_1_0 ZeExternalSemaphoreExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_FABRIC_EXP_NAME = "ZE_experimental_fabric"
// ZeFabricExpVersion (ze_fabric_exp_version_t) Fabric Topology Discovery Extension Version(s)
type ZeFabricExpVersion uintptr
type ZeFabricExpVersion uint32
const (
ZE_FABRIC_EXP_VERSION_1_0 ZeFabricExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_FABRIC_EXP_VERSION_1_0 version 1.0
@@ -36,7 +36,7 @@ const (
const ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE = 256
// ZeFabricVertexExpType (ze_fabric_vertex_exp_type_t) Fabric Vertex types
type ZeFabricVertexExpType uintptr
type ZeFabricVertexExpType uint32
const (
ZE_FABRIC_VERTEX_EXP_TYPE_UNKNOWN ZeFabricVertexExpType = 0 // ZE_FABRIC_VERTEX_EXP_TYPE_UNKNOWN Fabric vertex type is unknown
@@ -48,7 +48,7 @@ const (
)
// ZeFabricEdgeExpDuplexity (ze_fabric_edge_exp_duplexity_t) Fabric edge duplexity
type ZeFabricEdgeExpDuplexity uintptr
type ZeFabricEdgeExpDuplexity uint32
const (
ZE_FABRIC_EDGE_EXP_DUPLEXITY_UNKNOWN ZeFabricEdgeExpDuplexity = 0 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_UNKNOWN Fabric edge duplexity is unknown

View File

@@ -21,7 +21,7 @@ import (
const ZE_FLOAT_ATOMICS_EXT_NAME = "ZE_extension_float_atomics"
// ZeFloatAtomicsExtVersion (ze_float_atomics_ext_version_t) Floating-Point Atomics Extension Version(s)
type ZeFloatAtomicsExtVersion uintptr
type ZeFloatAtomicsExtVersion uint32
const (
ZE_FLOAT_ATOMICS_EXT_VERSION_1_0 ZeFloatAtomicsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_FLOAT_ATOMICS_EXT_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_GLOBAL_OFFSET_EXP_NAME = "ZE_experimental_global_offset"
// ZeGlobalOffsetExpVersion (ze_global_offset_exp_version_t) Global Offset Extension Version(s)
type ZeGlobalOffsetExpVersion uintptr
type ZeGlobalOffsetExpVersion uint32
const (
ZE_GLOBAL_OFFSET_EXP_VERSION_1_0 ZeGlobalOffsetExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_GLOBAL_OFFSET_EXP_VERSION_1_0 version 1.0

View File

@@ -30,7 +30,7 @@ const (
)
// ZeImageType (ze_image_type_t) Supported image types
type ZeImageType uintptr
type ZeImageType uint32
const (
ZE_IMAGE_TYPE_1D ZeImageType = 0 // ZE_IMAGE_TYPE_1D 1D
@@ -44,7 +44,7 @@ const (
)
// ZeImageFormatLayout (ze_image_format_layout_t) Supported image format layouts
type ZeImageFormatLayout uintptr
type ZeImageFormatLayout uint32
const (
ZE_IMAGE_FORMAT_LAYOUT_8 ZeImageFormatLayout = 0 // ZE_IMAGE_FORMAT_LAYOUT_8 8-bit single component layout
@@ -98,7 +98,7 @@ const (
)
// ZeImageFormatType (ze_image_format_type_t) Supported image format types
type ZeImageFormatType uintptr
type ZeImageFormatType uint32
const (
ZE_IMAGE_FORMAT_TYPE_UINT ZeImageFormatType = 0 // ZE_IMAGE_FORMAT_TYPE_UINT Unsigned integer
@@ -111,7 +111,7 @@ const (
)
// ZeImageFormatSwizzle (ze_image_format_swizzle_t) Supported image format component swizzle into channel
type ZeImageFormatSwizzle uintptr
type ZeImageFormatSwizzle uint32
const (
ZE_IMAGE_FORMAT_SWIZZLE_R ZeImageFormatSwizzle = 0 // ZE_IMAGE_FORMAT_SWIZZLE_R Red component

View File

@@ -23,7 +23,7 @@ import (
const ZE_IMAGE_COPY_EXT_NAME = "ZE_extension_image_copy"
// ZeImageCopyExtVersion (ze_image_copy_ext_version_t) Image Copy Extension Version(s)
type ZeImageCopyExtVersion uintptr
type ZeImageCopyExtVersion uint32
const (
ZE_IMAGE_COPY_EXT_VERSION_1_0 ZeImageCopyExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_COPY_EXT_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME = "ZE_extension_image_format_support"
// ZeImageFormatSupportExtVersion (ze_image_format_support_ext_version_t) Image Format Support Extension Version(s)
type ZeImageFormatSupportExtVersion uintptr
type ZeImageFormatSupportExtVersion uint32
const (
ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 ZeImageFormatSupportExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_NAME = "ZE_extension_image_query_alloc_properties"
// ZeImageQueryAllocPropertiesExtVersion (ze_image_query_alloc_properties_ext_version_t) Image Query Allocation Properties Extension Version(s)
type ZeImageQueryAllocPropertiesExtVersion uintptr
type ZeImageQueryAllocPropertiesExtVersion uint32
const (
ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 ZeImageQueryAllocPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME = "ZE_experimental_image_memory_properties"
// ZeImageMemoryPropertiesExpVersion (ze_image_memory_properties_exp_version_t) Image Memory Properties Extension Version(s)
type ZeImageMemoryPropertiesExpVersion uintptr
type ZeImageMemoryPropertiesExpVersion uint32
const (
ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 ZeImageMemoryPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_IMAGE_VIEW_EXT_NAME = "ZE_extension_image_view"
// ZeImageViewExtVersion (ze_image_view_ext_version_t) Image View Extension Version(s)
type ZeImageViewExtVersion uintptr
type ZeImageViewExtVersion uint32
const (
ZE_IMAGE_VIEW_EXT_VERSION_1_0 ZeImageViewExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_EXT_VERSION_1_0 version 1.0
@@ -91,7 +91,7 @@ func ZeImageViewCreateExt(
const ZE_IMAGE_VIEW_EXP_NAME = "ZE_experimental_image_view"
// ZeImageViewExpVersion (ze_image_view_exp_version_t) Image View Extension Version(s)
type ZeImageViewExpVersion uintptr
type ZeImageViewExpVersion uint32
const (
ZE_IMAGE_VIEW_EXP_VERSION_1_0 ZeImageViewExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_EXP_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_IMAGE_VIEW_PLANAR_EXT_NAME = "ZE_extension_image_view_planar"
// ZeImageViewPlanarExtVersion (ze_image_view_planar_ext_version_t) Image View Planar Extension Version(s)
type ZeImageViewPlanarExtVersion uintptr
type ZeImageViewPlanarExtVersion uint32
const (
ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 ZeImageViewPlanarExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 version 1.0
@@ -42,7 +42,7 @@ type ZeImageViewPlanarExtDesc struct {
const ZE_IMAGE_VIEW_PLANAR_EXP_NAME = "ZE_experimental_image_view_planar"
// ZeImageViewPlanarExpVersion (ze_image_view_planar_exp_version_t) Image View Planar Extension Version(s)
type ZeImageViewPlanarExpVersion uintptr
type ZeImageViewPlanarExpVersion uint32
const (
ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 ZeImageViewPlanarExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_NAME = "ZE_experimental_immediate_command_list_append"
// ZeImmediateCommandListAppendExpVersion (ze_immediate_command_list_append_exp_version_t) Immediate Command List Append Extension Version(s)
type ZeImmediateCommandListAppendExpVersion uintptr
type ZeImmediateCommandListAppendExpVersion uint32
const (
ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 ZeImmediateCommandListAppendExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME = "ZE_extension_ipc_mem_handle_type"
// ZeIpcMemHandleTypeExtVersion (ze_ipc_mem_handle_type_ext_version_t) IPC Memory Handle Type Extension Version(s)
type ZeIpcMemHandleTypeExtVersion uintptr
type ZeIpcMemHandleTypeExtVersion uint32
const (
ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 ZeIpcMemHandleTypeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME = "ZE_experimental_kernel_allocation_properties"
// ZeKernelGetAllocationPropertiesExpVersion (ze_kernel_get_allocation_properties_exp_version_t) Get Kernel Allocation Properties Extension Version(s)
type ZeKernelGetAllocationPropertiesExpVersion uintptr
type ZeKernelGetAllocationPropertiesExpVersion uint32
const (
ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 ZeKernelGetAllocationPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_GET_KERNEL_BINARY_EXP_NAME = "ZE_extension_kernel_binary_exp"
// ZeKernelGetBinaryExpVersion (ze_kernel_get_binary_exp_version_t) Get Kernel Binary Extension Version(s)
type ZeKernelGetBinaryExpVersion uintptr
type ZeKernelGetBinaryExpVersion uint32
const (
ZE_KERNEL_GET_BINARY_EXP_VERSION_1_0 ZeKernelGetBinaryExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_KERNEL_GET_BINARY_EXP_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_kernel_max_group_size_properties"
// ZeKernelMaxGroupSizePropertiesExtVersion (ze_kernel_max_group_size_properties_ext_version_t) Kernel Max Group Size Properties Extension Version(s)
type ZeKernelMaxGroupSizePropertiesExtVersion uintptr
type ZeKernelMaxGroupSizePropertiesExtVersion uint32
const (
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 ZeKernelMaxGroupSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_KERNEL_SCHEDULING_HINTS_EXP_NAME = "ZE_experimental_scheduling_hints"
// ZeSchedulingHintsExpVersion (ze_scheduling_hints_exp_version_t) Kernel Scheduling Hints Extension Version(s)
type ZeSchedulingHintsExpVersion uintptr
type ZeSchedulingHintsExpVersion uint32
const (
ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 ZeSchedulingHintsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_LINKAGE_INSPECTION_EXT_NAME = "ZE_extension_linkage_inspection"
// ZeLinkageInspectionExtVersion (ze_linkage_inspection_ext_version_t) Linkage Inspection Extension Version(s)
type ZeLinkageInspectionExtVersion uintptr
type ZeLinkageInspectionExtVersion uint32
const (
ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 ZeLinkageInspectionExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 version 1.0

View File

@@ -17,7 +17,7 @@ package gozel
const ZE_LINKONCE_ODR_EXT_NAME = "ZE_extension_linkonce_odr"
// ZeLinkonceOdrExtVersion (ze_linkonce_odr_ext_version_t) Linkonce ODR Extension Version(s)
type ZeLinkonceOdrExtVersion uintptr
type ZeLinkonceOdrExtVersion uint32
const (
ZE_LINKONCE_ODR_EXT_VERSION_1_0 ZeLinkonceOdrExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_LINKONCE_ODR_EXT_VERSION_1_0 version 1.0

View File

@@ -262,7 +262,7 @@ func ZeMemFree(
}
// ZeMemoryType (ze_memory_type_t) Memory allocation type
type ZeMemoryType uintptr
type ZeMemoryType uint32
const (
ZE_MEMORY_TYPE_UNKNOWN ZeMemoryType = 0 // ZE_MEMORY_TYPE_UNKNOWN the memory pointed to is of unknown type

View File

@@ -21,7 +21,7 @@ import (
const ZE_MEMORY_COMPRESSION_HINTS_EXT_NAME = "ZE_extension_memory_compression_hints"
// ZeMemoryCompressionHintsExtVersion (ze_memory_compression_hints_ext_version_t) Memory Compression Hints Extension Version(s)
type ZeMemoryCompressionHintsExtVersion uintptr
type ZeMemoryCompressionHintsExtVersion uint32
const (
ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 ZeMemoryCompressionHintsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZE_MEMORY_FREE_POLICIES_EXT_NAME = "ZE_extension_memory_free_policies"
// ZeMemoryFreePoliciesExtVersion (ze_memory_free_policies_ext_version_t) Memory Free Policies Extension Version(s)
type ZeMemoryFreePoliciesExtVersion uintptr
type ZeMemoryFreePoliciesExtVersion uint32
const (
ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 ZeMemoryFreePoliciesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_DEVICE_MEMORY_PROPERTIES_EXT_NAME = "ZE_extension_device_memory_properties"
// ZeDeviceMemoryPropertiesExtVersion (ze_device_memory_properties_ext_version_t) Device Memory Properties Extension Version(s)
type ZeDeviceMemoryPropertiesExtVersion uintptr
type ZeDeviceMemoryPropertiesExtVersion uint32
const (
ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 ZeDeviceMemoryPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 version 1.0
@@ -31,7 +31,7 @@ const (
)
// ZeDeviceMemoryExtType (ze_device_memory_ext_type_t) Memory module types
type ZeDeviceMemoryExtType uintptr
type ZeDeviceMemoryExtType uint32
const (
ZE_DEVICE_MEMORY_EXT_TYPE_HBM ZeDeviceMemoryExtType = 0 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM HBM memory

View File

@@ -20,7 +20,7 @@ import (
)
// ZeModuleFormat (ze_module_format_t) Supported module creation input formats
type ZeModuleFormat uintptr
type ZeModuleFormat uint32
const (
ZE_MODULE_FORMAT_IL_SPIRV ZeModuleFormat = 0 // ZE_MODULE_FORMAT_IL_SPIRV Format is SPIRV IL format

View File

@@ -23,7 +23,7 @@ import (
const ZE_MUTABLE_COMMAND_LIST_EXP_NAME = "ZE_experimental_mutable_command_list"
// ZeMutableCommandListExpVersion (ze_mutable_command_list_exp_version_t) Mutable Command List Extension Version(s)
type ZeMutableCommandListExpVersion uintptr
type ZeMutableCommandListExpVersion uint32
const (
ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_CONTEXT_POWER_SAVING_HINT_EXP_NAME = "ZE_experimental_power_saving_hint"
// ZePowerSavingHintExpVersion (ze_power_saving_hint_exp_version_t) Power Saving Hint Extension Version(s)
type ZePowerSavingHintExpVersion uintptr
type ZePowerSavingHintExpVersion uint32
const (
ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 ZePowerSavingHintExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 version 1.0
@@ -31,7 +31,7 @@ const (
)
// ZePowerSavingHintType (ze_power_saving_hint_type_t) Supported device types
type ZePowerSavingHintType uintptr
type ZePowerSavingHintType uint32
const (
ZE_POWER_SAVING_HINT_TYPE_MIN ZePowerSavingHintType = 0 // ZE_POWER_SAVING_HINT_TYPE_MIN Minumum power savings. The device will make no attempt to save power

View File

@@ -21,7 +21,7 @@ import (
const ZE_MODULE_PROGRAM_EXP_NAME = "ZE_experimental_module_program"
// ZeModuleProgramExpVersion (ze_module_program_exp_version_t) Module Program Extension Version(s)
type ZeModuleProgramExpVersion uintptr
type ZeModuleProgramExpVersion uint32
const (
ZE_MODULE_PROGRAM_EXP_VERSION_1_0 ZeModuleProgramExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MODULE_PROGRAM_EXP_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_RAYTRACING_EXT_NAME = "ZE_extension_raytracing"
// ZeRaytracingExtVersion (ze_raytracing_ext_version_t) Raytracing Extension Version(s)
type ZeRaytracingExtVersion uintptr
type ZeRaytracingExtVersion uint32
const (
ZE_RAYTRACING_EXT_VERSION_1_0 ZeRaytracingExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RAYTRACING_EXT_VERSION_1_0 version 1.0

View File

@@ -21,7 +21,7 @@ import (
const ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME = "ZE_experimental_relaxed_allocation_limits"
// ZeRelaxedAllocationLimitsExpVersion (ze_relaxed_allocation_limits_exp_version_t) Relaxed Allocation Limits Extension Version(s)
type ZeRelaxedAllocationLimitsExpVersion uintptr
type ZeRelaxedAllocationLimitsExpVersion uint32
const (
ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_1_0 ZeRelaxedAllocationLimitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_1_0 version 1.0

View File

@@ -20,7 +20,7 @@ import (
)
// ZeSamplerAddressMode (ze_sampler_address_mode_t) Sampler addressing modes
type ZeSamplerAddressMode uintptr
type ZeSamplerAddressMode uint32
const (
ZE_SAMPLER_ADDRESS_MODE_NONE ZeSamplerAddressMode = 0 // ZE_SAMPLER_ADDRESS_MODE_NONE No coordinate modifications for out-of-bounds image access.
@@ -37,7 +37,7 @@ const (
)
// ZeSamplerFilterMode (ze_sampler_filter_mode_t) Sampler filtering modes
type ZeSamplerFilterMode uintptr
type ZeSamplerFilterMode uint32
const (
ZE_SAMPLER_FILTER_MODE_NEAREST ZeSamplerFilterMode = 0 // ZE_SAMPLER_FILTER_MODE_NEAREST No coordinate modifications for out of bounds image access.

View File

@@ -21,7 +21,7 @@ import (
const ZE_SUB_ALLOCATIONS_EXP_NAME = "ZE_experimental_sub_allocations"
// ZeSubAllocationsExpVersion (ze_sub_allocations_exp_version_t) Sub-Allocations Properties Extension Version(s)
type ZeSubAllocationsExpVersion uintptr
type ZeSubAllocationsExpVersion uint32
const (
ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 ZeSubAllocationsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 version 1.0

View File

@@ -17,7 +17,7 @@ package gozel
const ZE_SUBGROUPS_EXT_NAME = "ZE_extension_subgroups"
// ZeSubgroupExtVersion (ze_subgroup_ext_version_t) Subgroups Extension Version(s)
type ZeSubgroupExtVersion uintptr
type ZeSubgroupExtVersion uint32
const (
ZE_SUBGROUP_EXT_VERSION_1_0 ZeSubgroupExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SUBGROUP_EXT_VERSION_1_0 version 1.0

View File

@@ -20,7 +20,7 @@ import (
)
// ZeMemoryAccessAttribute (ze_memory_access_attribute_t) Virtual memory page access attributes
type ZeMemoryAccessAttribute uintptr
type ZeMemoryAccessAttribute uint32
const (
ZE_MEMORY_ACCESS_ATTRIBUTE_NONE ZeMemoryAccessAttribute = 0 // ZE_MEMORY_ACCESS_ATTRIBUTE_NONE Indicates the memory page is inaccessible.

View File

@@ -20,7 +20,7 @@ import (
)
// ZesOverclockDomain (zes_overclock_domain_t) Overclock domains.
type ZesOverclockDomain uintptr
type ZesOverclockDomain uint32
const (
ZES_OVERCLOCK_DOMAIN_CARD ZesOverclockDomain = 1 // ZES_OVERCLOCK_DOMAIN_CARD Overclocking card level properties such as temperature limits.
@@ -37,7 +37,7 @@ const (
)
// ZesOverclockControl (zes_overclock_control_t) Overclock controls.
type ZesOverclockControl uintptr
type ZesOverclockControl uint32
const (
ZES_OVERCLOCK_CONTROL_VF ZesOverclockControl = 1 // ZES_OVERCLOCK_CONTROL_VF This control permits setting a custom V-F curve.
@@ -66,7 +66,7 @@ const (
)
// ZesOverclockMode (zes_overclock_mode_t) Overclock modes.
type ZesOverclockMode uintptr
type ZesOverclockMode uint32
const (
ZES_OVERCLOCK_MODE_MODE_OFF ZesOverclockMode = 0 // ZES_OVERCLOCK_MODE_MODE_OFF Overclock mode is off
@@ -82,7 +82,7 @@ const (
)
// ZesControlState (zes_control_state_t) Overclock control states.
type ZesControlState uintptr
type ZesControlState uint32
const (
ZES_CONTROL_STATE_STATE_UNSET ZesControlState = 0 // ZES_CONTROL_STATE_STATE_UNSET No overclock control has not been changed by the driver since the last
@@ -99,7 +99,7 @@ const (
)
// ZesPendingAction (zes_pending_action_t) Overclock pending actions.
type ZesPendingAction uintptr
type ZesPendingAction uint32
const (
ZES_PENDING_ACTION_PENDING_NONE ZesPendingAction = 0 // ZES_PENDING_ACTION_PENDING_NONE There no pending actions. .
@@ -114,7 +114,7 @@ const (
)
// ZesVfProgramType (zes_vf_program_type_t) Overclock V-F curve programing.
type ZesVfProgramType uintptr
type ZesVfProgramType uint32
const (
ZES_VF_PROGRAM_TYPE_VF_ARBITRARY ZesVfProgramType = 0 // ZES_VF_PROGRAM_TYPE_VF_ARBITRARY Can program an arbitrary number of V-F points up to the maximum number
@@ -135,7 +135,7 @@ const (
)
// ZesVfType (zes_vf_type_t) VF type
type ZesVfType uintptr
type ZesVfType uint32
const (
ZES_VF_TYPE_VOLT ZesVfType = 0 // ZES_VF_TYPE_VOLT VF Voltage point
@@ -145,7 +145,7 @@ const (
)
// ZesVfArrayType (zes_vf_array_type_t) VF type
type ZesVfArrayType uintptr
type ZesVfArrayType uint32
const (
ZES_VF_ARRAY_TYPE_USER_VF_ARRAY ZesVfArrayType = 0 // ZES_VF_ARRAY_TYPE_USER_VF_ARRAY User V-F array

View File

@@ -75,7 +75,7 @@ type ZesOverclockHandle uintptr
type ZesVfHandle uintptr
// ZesStructureType (zes_structure_type_t) Defines structure types
type ZesStructureType uintptr
type ZesStructureType uint32
const (
ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES ZesStructureType = 0x1 // ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES ::zes_device_properties_t

View File

@@ -77,7 +77,7 @@ const (
)
// ZesRepairStatus (zes_repair_status_t) Device repair status
type ZesRepairStatus uintptr
type ZesRepairStatus uint32
const (
ZES_REPAIR_STATUS_UNSUPPORTED ZesRepairStatus = 0 // ZES_REPAIR_STATUS_UNSUPPORTED The device does not support in-field repairs.
@@ -101,7 +101,7 @@ const (
)
// ZesResetType (zes_reset_type_t) Device reset type
type ZesResetType uintptr
type ZesResetType uint32
const (
ZES_RESET_TYPE_WARM ZesResetType = 0 // ZES_RESET_TYPE_WARM Apply warm reset
@@ -136,7 +136,7 @@ type ZesUuid struct {
}
// ZesDeviceType (zes_device_type_t) Supported device types
type ZesDeviceType uintptr
type ZesDeviceType uint32
const (
ZES_DEVICE_TYPE_GPU ZesDeviceType = 1 // ZES_DEVICE_TYPE_GPU Graphics Processing Unit
@@ -417,7 +417,7 @@ type ZesPciProperties struct {
}
// ZesPciLinkStatus (zes_pci_link_status_t) PCI link status
type ZesPciLinkStatus uintptr
type ZesPciLinkStatus uint32
const (
ZES_PCI_LINK_STATUS_UNKNOWN ZesPciLinkStatus = 0 // ZES_PCI_LINK_STATUS_UNKNOWN The link status could not be determined
@@ -462,7 +462,7 @@ type ZesPciState struct {
}
// ZesPciBarType (zes_pci_bar_type_t) PCI bar types
type ZesPciBarType uintptr
type ZesPciBarType uint32
const (
ZES_PCI_BAR_TYPE_MMIO ZesPciBarType = 0 // ZES_PCI_BAR_TYPE_MMIO MMIO registers

View File

@@ -20,7 +20,7 @@ import (
)
// ZesDiagResult (zes_diag_result_t) Diagnostic results
type ZesDiagResult uintptr
type ZesDiagResult uint32
const (
ZES_DIAG_RESULT_NO_ERRORS ZesDiagResult = 0 // ZES_DIAG_RESULT_NO_ERRORS Diagnostic completed without finding errors to repair

View File

@@ -20,7 +20,7 @@ import (
)
// ZesDeviceEccState (zes_device_ecc_state_t) ECC State
type ZesDeviceEccState uintptr
type ZesDeviceEccState uint32
const (
ZES_DEVICE_ECC_STATE_UNAVAILABLE ZesDeviceEccState = 0 // ZES_DEVICE_ECC_STATE_UNAVAILABLE None
@@ -31,7 +31,7 @@ const (
)
// ZesDeviceAction (zes_device_action_t) State Change Requirements
type ZesDeviceAction uintptr
type ZesDeviceAction uint32
const (
ZES_DEVICE_ACTION_NONE ZesDeviceAction = 0 // ZES_DEVICE_ACTION_NONE No action.

View File

@@ -21,7 +21,7 @@ import (
const ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_NAME = "ZES_extension_device_ecc_default_properties"
// ZesDeviceEccDefaultPropertiesExtVersion (zes_device_ecc_default_properties_ext_version_t) Device ECC default properties Extension Version(s)
type ZesDeviceEccDefaultPropertiesExtVersion uintptr
type ZesDeviceEccDefaultPropertiesExtVersion uint32
const (
ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_1_0 ZesDeviceEccDefaultPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_1_0 version 1.0

View File

@@ -20,7 +20,7 @@ import (
)
// ZesEngineGroup (zes_engine_group_t) Accelerator engine groups
type ZesEngineGroup uintptr
type ZesEngineGroup uint32
const (
ZES_ENGINE_GROUP_ALL ZesEngineGroup = 0 // ZES_ENGINE_GROUP_ALL Access information about all engines combined.

View File

@@ -23,7 +23,7 @@ import (
const ZES_ENGINE_ACTIVITY_EXT_NAME = "ZES_extension_engine_activity"
// ZesEngineActivityExtVersion (zes_engine_activity_ext_version_t) Engine Activity Extension Version(s)
type ZesEngineActivityExtVersion uintptr
type ZesEngineActivityExtVersion uint32
const (
ZES_ENGINE_ACTIVITY_EXT_VERSION_1_0 ZesEngineActivityExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_ENGINE_ACTIVITY_EXT_VERSION_1_0 version 1.0

View File

@@ -27,7 +27,7 @@ const ZES_MAX_FABRIC_PORT_MODEL_SIZE = 256
const ZES_MAX_FABRIC_LINK_TYPE_SIZE = 256
// ZesFabricPortStatus (zes_fabric_port_status_t) Fabric port status
type ZesFabricPortStatus uintptr
type ZesFabricPortStatus uint32
const (
ZES_FABRIC_PORT_STATUS_UNKNOWN ZesFabricPortStatus = 0 // ZES_FABRIC_PORT_STATUS_UNKNOWN The port status cannot be determined

View File

@@ -20,7 +20,7 @@ import (
)
// ZesFanSpeedMode (zes_fan_speed_mode_t) Fan resource speed mode
type ZesFanSpeedMode uintptr
type ZesFanSpeedMode uint32
const (
ZES_FAN_SPEED_MODE_DEFAULT ZesFanSpeedMode = 0 // ZES_FAN_SPEED_MODE_DEFAULT The fan speed is operating using the hardware default settings
@@ -34,7 +34,7 @@ const (
)
// ZesFanSpeedUnits (zes_fan_speed_units_t) Fan speed units
type ZesFanSpeedUnits uintptr
type ZesFanSpeedUnits uint32
const (
ZES_FAN_SPEED_UNITS_RPM ZesFanSpeedUnits = 0 // ZES_FAN_SPEED_UNITS_RPM The fan speed is in units of revolutions per minute (rpm)

View File

@@ -23,7 +23,7 @@ import (
const ZES_FIRMWARE_SECURITY_VERSION_EXP_NAME = "ZES_experimental_firmware_security_version"
// ZesFirmwareSecurityExpVersion (zes_firmware_security_exp_version_t) Firmware security version Extension Version(s)
type ZesFirmwareSecurityExpVersion uintptr
type ZesFirmwareSecurityExpVersion uint32
const (
ZES_FIRMWARE_SECURITY_EXP_VERSION_1_0 ZesFirmwareSecurityExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_FIRMWARE_SECURITY_EXP_VERSION_1_0 version 1.0

View File

@@ -20,7 +20,7 @@ import (
)
// ZesFreqDomain (zes_freq_domain_t) Frequency domains.
type ZesFreqDomain uintptr
type ZesFreqDomain uint32
const (
ZES_FREQ_DOMAIN_GPU ZesFreqDomain = 0 // ZES_FREQ_DOMAIN_GPU GPU Core Domain.
@@ -116,7 +116,7 @@ type ZesFreqThrottleTime struct {
// /
// / @details
// / - [DEPRECATED] No longer supported.
type ZesOcMode uintptr
type ZesOcMode uint32
const (
ZES_OC_MODE_OFF ZesOcMode = 0 // ZES_OC_MODE_OFF Overclocking if off - hardware is running using factory default

View File

@@ -21,7 +21,7 @@ import (
const ZES_MEM_PAGE_OFFLINE_STATE_EXP_NAME = "ZES_extension_mem_state"
// ZesMemPageOfflineStateExpVersion (zes_mem_page_offline_state_exp_version_t) Memory State Extension Version(s)
type ZesMemPageOfflineStateExpVersion uintptr
type ZesMemPageOfflineStateExpVersion uint32
const (
ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_1_0 ZesMemPageOfflineStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_1_0 version 1.0

View File

@@ -20,7 +20,7 @@ import (
)
// ZesMemType (zes_mem_type_t) Memory module types
type ZesMemType uintptr
type ZesMemType uint32
const (
ZES_MEM_TYPE_HBM ZesMemType = 0 // ZES_MEM_TYPE_HBM HBM memory
@@ -48,7 +48,7 @@ const (
)
// ZesMemLoc (zes_mem_loc_t) Memory module location
type ZesMemLoc uintptr
type ZesMemLoc uint32
const (
ZES_MEM_LOC_SYSTEM ZesMemLoc = 0 // ZES_MEM_LOC_SYSTEM System memory
@@ -58,7 +58,7 @@ const (
)
// ZesMemHealth (zes_mem_health_t) Memory health
type ZesMemHealth uintptr
type ZesMemHealth uint32
const (
ZES_MEM_HEALTH_UNKNOWN ZesMemHealth = 0 // ZES_MEM_HEALTH_UNKNOWN The memory health cannot be determined.

View File

@@ -21,7 +21,7 @@ import (
const ZES_MEMORY_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES_NAME = "ZES_extension_mem_bandwidth_counter_bits_properties"
// ZesMemBandwidthCounterBitsExpVersion (zes_mem_bandwidth_counter_bits_exp_version_t) Memory Bandwidth Counter Valid Bits Extension Version(s)
type ZesMemBandwidthCounterBitsExpVersion uintptr
type ZesMemBandwidthCounterBitsExpVersion uint32
const (
ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_1_0 ZesMemBandwidthCounterBitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME = "ZES_extension_pci_link_speed_downgrade"
// ZesPciLinkSpeedDowngradeExtVersion (zes_pci_link_speed_downgrade_ext_version_t) PCI Link Speed Downgrade Extension Version(s)
type ZesPciLinkSpeedDowngradeExtVersion uintptr
type ZesPciLinkSpeedDowngradeExtVersion uint32
const (
ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_1_0 ZesPciLinkSpeedDowngradeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_1_0 version 1.0

View File

@@ -20,7 +20,7 @@ import (
)
// ZesPowerDomain (zes_power_domain_t) Power Domain
type ZesPowerDomain uintptr
type ZesPowerDomain uint32
const (
ZES_POWER_DOMAIN_UNKNOWN ZesPowerDomain = 0 // ZES_POWER_DOMAIN_UNKNOWN The PUnit power domain level cannot be determined.
@@ -34,7 +34,7 @@ const (
)
// ZesPowerLevel (zes_power_level_t) Power Level Type
type ZesPowerLevel uintptr
type ZesPowerLevel uint32
const (
ZES_POWER_LEVEL_UNKNOWN ZesPowerLevel = 0 // ZES_POWER_LEVEL_UNKNOWN The PUnit power monitoring duration cannot be determined.
@@ -62,7 +62,7 @@ const (
)
// ZesPowerSource (zes_power_source_t) Power Source Type
type ZesPowerSource uintptr
type ZesPowerSource uint32
const (
ZES_POWER_SOURCE_ANY ZesPowerSource = 0 // ZES_POWER_SOURCE_ANY Limit active no matter whether the power source is mains powered or
@@ -76,7 +76,7 @@ const (
)
// ZesLimitUnit (zes_limit_unit_t) Limit Unit
type ZesLimitUnit uintptr
type ZesLimitUnit uint32
const (
ZES_LIMIT_UNIT_UNKNOWN ZesLimitUnit = 0 // ZES_LIMIT_UNIT_UNKNOWN The PUnit power monitoring unit cannot be determined.

View File

@@ -21,7 +21,7 @@ import (
const ZES_POWER_DOMAIN_PROPERTIES_EXP_NAME = "ZES_extension_power_domain_properties"
// ZesPowerDomainPropertiesExpVersion (zes_power_domain_properties_exp_version_t) Power Domain Properties Extension Version(s)
type ZesPowerDomainPropertiesExpVersion uintptr
type ZesPowerDomainPropertiesExpVersion uint32
const (
ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_1_0 ZesPowerDomainPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_1_0 version 1.0

View File

@@ -23,7 +23,7 @@ import (
const ZES_POWER_LIMITS_EXT_NAME = "ZES_extension_power_limits"
// ZesPowerLimitsExtVersion (zes_power_limits_ext_version_t) Power Limits Extension Version(s)
type ZesPowerLimitsExtVersion uintptr
type ZesPowerLimitsExtVersion uint32
const (
ZES_POWER_LIMITS_EXT_VERSION_1_0 ZesPowerLimitsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_POWER_LIMITS_EXT_VERSION_1_0 version 1.0

View File

@@ -20,7 +20,7 @@ import (
)
// ZesPsuVoltageStatus (zes_psu_voltage_status_t) PSU voltage status
type ZesPsuVoltageStatus uintptr
type ZesPsuVoltageStatus uint32
const (
ZES_PSU_VOLTAGE_STATUS_UNKNOWN ZesPsuVoltageStatus = 0 // ZES_PSU_VOLTAGE_STATUS_UNKNOWN The status of the power supply voltage controllers cannot be

View File

@@ -20,7 +20,7 @@ import (
)
// ZesRasErrorType (zes_ras_error_type_t) RAS error type
type ZesRasErrorType uintptr
type ZesRasErrorType uint32
const (
ZES_RAS_ERROR_TYPE_CORRECTABLE ZesRasErrorType = 0 // ZES_RAS_ERROR_TYPE_CORRECTABLE Errors were corrected by hardware
@@ -30,7 +30,7 @@ const (
)
// ZesRasErrorCat (zes_ras_error_cat_t) RAS error categories
type ZesRasErrorCat uintptr
type ZesRasErrorCat uint32
const (
ZES_RAS_ERROR_CAT_RESET ZesRasErrorCat = 0 // ZES_RAS_ERROR_CAT_RESET The number of accelerator engine resets attempted by the driver

View File

@@ -23,7 +23,7 @@ import (
const ZES_RAS_GET_STATE_EXP_NAME = "ZES_extension_ras_state"
// ZesRasStateExpVersion (zes_ras_state_exp_version_t) RAS Get State Extension Version(s)
type ZesRasStateExpVersion uintptr
type ZesRasStateExpVersion uint32
const (
ZES_RAS_STATE_EXP_VERSION_1_0 ZesRasStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_RAS_STATE_EXP_VERSION_1_0 version 1.0
@@ -33,7 +33,7 @@ const (
)
// ZesRasErrorCategoryExp (zes_ras_error_category_exp_t) RAS error categories
type ZesRasErrorCategoryExp uintptr
type ZesRasErrorCategoryExp uint32
const (
ZES_RAS_ERROR_CATEGORY_EXP_RESET ZesRasErrorCategoryExp = 0 // ZES_RAS_ERROR_CATEGORY_EXP_RESET The number of accelerator engine resets attempted by the driver

Some files were not shown because too many files have changed in this diff Show More