You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -38,7 +45,17 @@ Following input data is generated,
38
45
## Running
39
46
40
47
Help:
41
-
`./build/SPIRVRunner` < Output Tensor Name >
48
+
49
+
```
50
+
USAGE: SPIRVRunner [options]
51
+
52
+
General options:
53
+
54
+
-o <string> - <Specify Output Tensor Name>
55
+
56
+
-p - Enable kernel time profiling
57
+
```
58
+
42
59
43
60
Note: `Output Tensor Name` is essentially a chosen tensor that needs to be copied back to the CPU and written to disk. Additionally, the name must match the tensor's name (tensor_) and number as specified in the JSON file. Please refer args_data.json file.
44
61
@@ -47,18 +64,17 @@ Note: `Output Tensor Name` is essentially a chosen tensor that needs to be copi
47
64
`SPIRVRunner` is configured to run the `add_kernel.spv` SPIRV binary with inputs `tensor_0.pt` and `tensor_1.pt` and output `tensor_2.pt`. `add_kernel.spv` was generated from the `01-vector-add.py` tutorial.
48
65
49
66
SPIRVRunner Usage:
50
-
`./build/SPIRVRunner tensor_2`
67
+
`./build/SPIRVRunner -o tensor_2 -p`
51
68
52
69
Expected output follows:
53
70
54
71
```
55
72
Running on device: Intel(R) Data Center GPU Max 1100
56
73
Read 3772 byte kernel.
57
-
create kernel:add_kernel
58
74
Loaded kernel with 0 registers and 0 register spills.
The GPU hardware, shape and data type of each Tensor (along with number of bytes), and kernel information are printed. The shape and data type of the output Tensor is currently printed, along with the the first cell in the output. Ensuring the value of the first cell is non-zero allows for a quick sanity check. The output Tensor is written to a file `cpp_outs.pt` which is a Tensor in PyTorch format. Typically, we will create a quick Python script to read the input Tensor, run the same computations in PyTorch, and then compare the PyTorch result with the loaded `cpp_outs.pt` Tensor using the PyTorch testing API.
0 commit comments