Hansung Kim
e3c4a4d2f5
sgemm_tcore: Improve agen for !transpose_as smem load
2024-06-10 22:08:37 -07:00
Hansung Kim
dc7bd6b248
sgemm_tcore: Fix warp_row/col calculation bug
2024-06-10 19:52:37 -07:00
Hansung Kim
3b2f5a31de
sgemm_tcore: Improve write_result addr gen
2024-06-10 19:34:00 -07:00
Hansung Kim
a22762db94
sgemm_tcore: Add GEMMINI_DMA to non-warp-specialized mode
...
~63% util for 128x128; ~83% for the k-loop.
FIXME: result is not correct currently. Need to fix the transpose
2024-06-10 19:32:39 -07:00
Hansung Kim
51d9cffb2d
Merge remote-tracking branch 'origin/kernels' into kernels
2024-06-10 16:41:36 -07:00
Hansung Kim
39449ece37
Add warp-specialized{, and dma enabled} kernel
...
NOTE: warpspecial_dma is hacked, need to get rid of dma invocation in
the consmer code.
2024-06-10 16:39:49 -07:00
Richard Yan
357435bc96
Merge branch 'kernels' of https://github.com/hansungk/vortex-private into kernels
2024-06-09 14:35:02 -07:00
Richard Yan
c327474e3b
power specific code for kernel
2024-06-09 14:34:58 -07:00
Hansung Kim
e4eed20de3
sgemm_gemmini_dma: Fix device addr for operands
2024-06-09 13:35:16 -07:00
Hansung Kim
90662484b1
sgemm_tcore: inline left out
2024-06-07 20:34:29 -07:00
Hansung Kim
d61dd85872
sgemm_tcore: Remove unused SIMT core code
2024-06-07 20:32:02 -07:00
Hansung Kim
aaf4a89b57
Fix asm label already defined error
2024-06-07 19:55:28 -07:00
Hansung Kim
9e8988df6b
Patch args device address for dma kernel
2024-06-07 18:32:07 -07:00
Hansung Kim
fc8f0c99f0
Merge branch 'tensor_core' into kernels
2024-06-07 18:27:02 -07:00
Hansung Kim
800d9801b5
tensor: Test with multiple accumulators
2024-06-07 18:19:20 -07:00
Hansung Kim
080923e869
common.mk: Add more aggressive inline flag
2024-06-07 18:14:40 -07:00
Hansung Kim
2cac995db9
tensor: generate 8x8 in correctness script
2024-06-07 18:13:57 -07:00
Richard Yan
7cf59c9480
dma and demo kernels
2024-06-07 18:11:19 -07:00
Hansung Kim
483f975439
Merge branch 'kernels' into tensor_core
2024-06-07 16:27:01 -07:00
Hansung Kim
3a6427a491
sgemm_tcore: Hardcode threadblock id 0
...
this is fine since we're statically dispatching only one threadblock to
the whole cluster.
2024-06-07 16:10:02 -07:00
Hansung Kim
856596cbb3
sgemm_tcore: Write reference C before sim
2024-06-07 10:39:11 -07:00
Hansung Kim
985c5fc0dc
sgemm_tcore: Remove uneffective register asm
2024-06-06 18:50:31 -07:00
Hansung Kim
7c4d850074
sgemm_tcore: Experiment with high K; 48% util
2024-06-06 18:42:14 -07:00
Hansung Kim
062403066e
sgemm_tcore: Bring M/N-loop inside the kernel
...
Instead of spawning multiple threadblocks which comes with stack access
overhead, have 1 threadblock work on the entire M/N-space thru a loop.
Grid size is fixed to the hardware parallelism.
TODO currently only works with 1 cluster in the system.
2024-06-06 15:22:01 -07:00
Hansung Kim
d5adacda30
Add args.bin to ELF
...
Change KERNEL_ARG_DEV_MEM_ADDR for sgemm_{wg,gemmini,tcore}
2024-06-06 15:19:39 -07:00
Hansung Kim
2c50b0cdce
sgemm_tcore: Remove BM_d/BN_d
2024-06-06 14:27:57 -07:00
Hansung Kim
7f6f096191
sgemm_tcore: Use if constexpr
2024-06-06 13:43:57 -07:00
Hansung Kim
deb6e5eba2
sgemm_tcore: Move bank-conflicts to SMEM stores from GMEM loads
2024-06-06 12:43:36 -07:00
Hansung Kim
ab4d525970
sgemm_tcore: More asserts on manual unrolling
2024-06-06 12:26:07 -07:00
Hansung Kim
a42fa6a113
sgemm_tcore: Swap out mul with bitwise ops for addr ping-pong
2024-06-05 19:01:59 -07:00
Hansung Kim
65c653afde
sgemm_tcore: Use arithmetic instead of branch for double-buffered addr
2024-06-05 18:03:08 -07:00
Hansung Kim
c7a6ed03de
sgemm_tcore: Use constant offset to reduce SMEM addr calc
2024-06-05 18:02:34 -07:00
Hansung Kim
95b5719847
sgemm_tcore: Split K-dim loop between consumer/producer
...
... so that you don't have to run (warpgroup_id == 0) condition at every
loop iteration which is expensive due to vx_split/join.
2024-06-05 17:15:30 -07:00
Hansung Kim
150f14af25
sgemm_tcore: Use multiple fp regs for GMEM->SMEM
2024-06-05 16:53:39 -07:00
Hansung Kim
e44173c65e
sgemm_tcore: Deconstruct addr calc for GMEM->SMEM
2024-06-05 15:11:01 -07:00
Hansung Kim
ff6e5bf6dc
sgemm_tcore: Deconstruct smem addr calc to reduce reg alloc
2024-06-05 14:50:36 -07:00
Hansung Kim
d8944db369
sgemm_tcore: Double-buffer over K-dimension
...
TODO: Not completely parameterized with DOUBLE_BUFFER yet.
2024-06-04 18:23:27 -07:00
Hansung Kim
18e3653d31
sgemm_tcore: Increase RF data reuse for WMITER/WNITER
...
... by splitting vx_wmma_load to vx_wmma_load_{a,b} and pulling it
out of the innermost loop.
TODO: there's some duplicate address compute being done in the both
functions.
2024-06-03 21:10:42 -07:00
Hansung Kim
4e723c4655
sgemm_tcore: Support two accumulation reg tiles
2024-06-01 01:12:38 -07:00
Hansung Kim
c8d6c56dd9
sgemm_tcore: Split global DMEM load into a function
2024-05-31 17:37:06 -07:00
Hansung Kim
220ee0aa5e
sgemm_tcore: Unroll around WMITER/WNITER
...
This is within a very tight loop so it's worth unrolling at the risk of
stack spills somewhere else.
2024-05-31 17:35:22 -07:00
Hansung Kim
2b5836022d
Also generate kernel.CONFIG.elf
2024-05-26 13:57:07 -07:00
Hansung Kim
c08a4cba8b
Add -ffixed-regs to tests/kernel makefile
2024-05-26 13:56:34 -07:00
Hansung Kim
1e48bad4f9
sgemm_tcore: Fix AS transpose
2024-05-26 13:51:47 -07:00
Hansung Kim
200fd3e08c
sgemm_tcore: Revert to packed smem alloc
2024-05-25 22:47:59 -07:00
Hansung Kim
bc7bd1a1dd
sgemm_tcore: Write reference C matrix to file
2024-05-25 22:47:15 -07:00
Hansung Kim
0a884e1ead
tensor: spawn on all warps, 8 lanes
2024-05-25 20:19:57 -07:00
Hansung Kim
b892c22f00
sgemm_tcore: Reflect WMITER/WNITER in threadblock size
2024-05-16 23:31:52 -07:00
Hansung Kim
18ecebddc0
sgemm_tcore: Fix round-down error with CORES_PER_CLUSTER
2024-05-16 21:36:24 -07:00
Hansung Kim
78b2a318c1
sgemm_tcore: Implement A transpose for coalesced smem access
2024-05-16 20:22:15 -07:00