CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
104 lines
3.8 KiB
TableGen
104 lines
3.8 KiB
TableGen
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file describes the RISC-V SPACEMIT RVV extension instruction formats.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// RISC-V SPACEMIT RVV class templates
|
|
//===----------------------------------------------------------------------===//
|
|
//===----------------------------------------------------------------------===//
|
|
// Operand definitions.
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
class SMTVDotOpcode<bits<7> val> { bits<7> Value = val; }
|
|
def OPMMA : SMTVDotOpcode<0b1110001>;
|
|
def OPMMA_SLIDE : SMTVDotOpcode<0b1110011>;
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Vector Dot-Product Sign Encoding
|
|
// Defines the signed/unsigned mixing modes for vector dot-product operations.
|
|
// Encoding format: [1:0] bits
|
|
// 00: UU (Unsigned x Unsigned)
|
|
// 01: US (Unsigned x Signed)
|
|
// 10: SU (Signed x Unsigned)
|
|
// 11: SS (Signed x Signed)
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
class VTypeEncode<bits<2> encoding, string name> {
|
|
bits<2> Encoding = encoding;
|
|
string Name = name;
|
|
}
|
|
defvar VTypeEncodes = [VTypeEncode<0b00, "u">,
|
|
VTypeEncode<0b01, "us">,
|
|
VTypeEncode<0b10, "su">,
|
|
VTypeEncode<0b11, "">];
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Vector Dot-Product Sliding Window Modes
|
|
// Encoding format: [1:0] bits
|
|
// 00: Slide1 (1-element sliding stride)
|
|
// 01: Slide2 (2-element sliding stride)
|
|
// 10: Slide3 (3-element sliding stride)
|
|
// 11: Reserved
|
|
//
|
|
// Used in sliding-window dot-product operations:
|
|
// vd = vs1 • vs2.slide{1|2|3} // • = dot product
|
|
//===----------------------------------------------------------------------===//
|
|
class SlideEncode<bits<2> encoding, string name> {
|
|
bits<2> Encoding = encoding;
|
|
string Name = name;
|
|
}
|
|
|
|
defvar SlideEncodes = [SlideEncode<0b00, "1">,
|
|
SlideEncode<0b01, "2">,
|
|
SlideEncode<0b10, "3">];
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Instruction formats
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
|
|
// Base vector dot product (no slide) format.
|
|
class SMTVMADot<bits<2> sign, string opcodestr, bit EarlyClobber = 0>
|
|
: RVInst<(outs VRM2:$vd_wb), (ins VRM2:$vd, VR:$vs1, VR:$vs2),
|
|
opcodestr, "$vd, $vs1, $vs2", [], InstFormatR> {
|
|
bits<5> vd;
|
|
bits<5> vs1;
|
|
bits<5> vs2;
|
|
|
|
let Inst{31-25} = OPMMA.Value;
|
|
let Inst{24-20} = vs2;
|
|
let Inst{19-15} = vs1;
|
|
let Inst{14} = 0b0;
|
|
let Inst{13-12} = sign;
|
|
let Inst{11-7} = vd;
|
|
let Inst{6-0} = OPC_CUSTOM_1.Value;
|
|
let Constraints =
|
|
!if(EarlyClobber, "@earlyclobber $vd_wb, $vd = $vd_wb", "$vd = $vd_wb");
|
|
let UseNamedOperandTable = true;
|
|
}
|
|
|
|
// Sliding-window vector dot product format.
|
|
class SMTVMADotSlide<bits<2> funct2, bits<2> sign, string opcodestr,
|
|
bit EarlyClobber = 0>
|
|
: RVInst<(outs VRM2:$vd_wb), (ins VRM2:$vd, VRM2:$vs1, VR:$vs2),
|
|
opcodestr, "$vd, $vs1, $vs2", [], InstFormatR> {
|
|
bits<5> vd;
|
|
bits<5> vs1;
|
|
bits<5> vs2;
|
|
|
|
let Inst{31-25} = OPMMA_SLIDE.Value;
|
|
let Inst{24-20} = vs2;
|
|
let Inst{19-16} = vs1{4-1};
|
|
let Inst{15-14} = funct2;
|
|
let Inst{13-12} = sign;
|
|
let Inst{11-7} = vd;
|
|
let Inst{6-0} = OPC_CUSTOM_1.Value;
|
|
let Constraints =
|
|
!if(EarlyClobber, "@earlyclobber $vd_wb, $vd = $vd_wb", "$vd = $vd_wb");
|
|
let UseNamedOperandTable = true;
|
|
}
|
|
}
|
|
|