Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions include/common/pto_tile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,8 @@ struct FixpAttr {
// (raw accumulator D) forbids final post-process; CCTRL[1] (ACC-only
// transparent cache hint) is validated against the operation kind at the
// wrapper layer.
// Chainable: preserves all other attributes, unlike the parameter-free
// static constructors (f16/bf16/keep_acc) which start from defaults.
constexpr FixpAttr with_cube_ctrl(CubeControl Ctrl) const {
FixpAttr Attr = *this;
static constexpr FixpAttr with_cube_ctrl(CubeControl Ctrl) {
FixpAttr Attr;
Attr.CubeCtrl = Ctrl;
return Attr;
}
Expand Down
16 changes: 6 additions & 10 deletions include/jcore/template_asm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3944,7 +3944,6 @@ PTO_SHARED_INLINE void matmul(Dst &dst, A &a, B &b, size_t M, size_t N,
// Local-A/Shared-B the A shard descriptor is per-PE (valid_rows == pe_m)
// and cannot supply group_M, so the caller must pass it here.
validate_matrix_contract<Attr, Dst, A, B>();
validate_cube_ctrl_contract<Attr, /*IsAccForm=*/false>();
if constexpr (!is_shared_tile_v<A> && !is_shared_tile_v<B>) {
asm volatile(
PTO_MATMUL_HEADER("TMATMUL", PTO_FIXP_ATTR)
Expand Down Expand Up @@ -4059,7 +4058,6 @@ PTO_SHARED_INLINE void matmul_acc(Dst &dst, C &c, A &a, B &b, size_t M,
size_t N, size_t K) {
validate_matrix_contract<Attr, Dst, A, B>();
validate_matrix_accumulator_contract<Attr, Dst, C, A, B>();
validate_cube_ctrl_contract<Attr, /*IsAccForm=*/true>();
if constexpr (!is_shared_tile_v<A> && !is_shared_tile_v<B>) {
asm volatile(
PTO_MATMUL_HEADER("TMATMUL.ACC", PTO_FIXP_ATTR)
Expand Down Expand Up @@ -5592,7 +5590,7 @@ PTO_SHARED_INLINE void emit_fixp(
uint64_t quant_gpr, uint64_t lrelu_gpr, size_t M, size_t N, size_t K) {
validate_matrix_contract<Attr, Dst, A, B>();
validate_matrix_postprocess_contract<Attr, SrcMask, OutMask, A, B,
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false, false>();
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false>();
if constexpr (!is_shared_tile_v<A> && !is_shared_tile_v<B>) {
PTO_FIXP_DISPATCH(PTO_FIXP_EMIT_LOCAL);
} else if constexpr (is_shared_tile_v<A> && !is_shared_tile_v<B>) {
Expand Down Expand Up @@ -5627,7 +5625,7 @@ PTO_SHARED_INLINE void emit_matmul_acc_fixp(
validate_matrix_accumulator_contract<Attr, Dst, C_, A, B>();
validate_cscale_contract<Attr, C_, CScale>();
validate_matrix_postprocess_contract<Attr, SrcMask, OutMask, A, B,
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false, true>();
RowIn, QuantTile, ReluTile, RowOut, GroupOut, true>();
if constexpr (!is_shared_tile_v<A> && !is_shared_tile_v<B>) {
PTO_FIXP_DISPATCH(PTO_FIXP_ACC_EMIT_LOCAL);
} else if constexpr (is_shared_tile_v<A> && !is_shared_tile_v<B>) {
Expand All @@ -5651,7 +5649,7 @@ PTO_SHARED_INLINE void emit_matmul_bias_fixp(
validate_matrix_contract<Attr, Dst, A, B>();
validate_matrix_bias_contract<Attr, BiasT, A, B>();
validate_matrix_postprocess_contract<Attr, SrcMask, OutMask, A, B,
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false, false>();
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false>();
if constexpr (!is_shared_tile_v<A> && !is_shared_tile_v<B>) {
PTO_FIXP_DISPATCH(PTO_FIXP_BIAS_EMIT_LOCAL);
} else if constexpr (is_shared_tile_v<A> && !is_shared_tile_v<B>) {
Expand Down Expand Up @@ -5841,7 +5839,7 @@ PTO_SHARED_INLINE void emit_gemv_fixp(
uint64_t quant_gpr, uint64_t lrelu_gpr, size_t M, size_t N, size_t K) {
validate_gemv_contract<Attr, Dst, Vec, Mtx>();
validate_matrix_postprocess_contract<Attr, SrcMask, OutMask, Vec, Mtx,
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false, false>();
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false>();
PTO_FIXP_DISPATCH(PTO_FIXP_GV_GV_EMIT_LOCAL);
}

Expand All @@ -5860,7 +5858,7 @@ PTO_SHARED_INLINE void emit_gemv_bias_fixp(
validate_gemv_contract<Attr, Dst, Vec, Mtx>();
validate_matrix_bias_contract<Attr, BiasT, Vec, Mtx>();
validate_matrix_postprocess_contract<Attr, SrcMask, OutMask, Vec, Mtx,
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false, false>();
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false>();
PTO_FIXP_DISPATCH(PTO_FIXP_GV_GVB_EMIT_LOCAL);
}

Expand All @@ -5879,7 +5877,7 @@ PTO_SHARED_INLINE void emit_gemv_acc_fixp(
validate_gemv_contract<Attr, Dst, Vec, Mtx>();
validate_matrix_accumulator_contract<Attr, Dst, C, Vec, Mtx>();
validate_matrix_postprocess_contract<Attr, SrcMask, OutMask, Vec, Mtx,
RowIn, QuantTile, ReluTile, RowOut, GroupOut, false, true>();
RowIn, QuantTile, ReluTile, RowOut, GroupOut, true>();
PTO_FIXP_DISPATCH(PTO_FIXP_GV_GVA_EMIT_LOCAL);
}

Expand Down Expand Up @@ -6027,7 +6025,6 @@ PTO_SHARED_INLINE void Name(Dst &dst, A &a, ScaleA &scale_a, B &b, \
constexpr bool HasScaleB = true; \
validate_matrix_contract<Attr, Dst, A, B, true>(); \
validate_matrix_scale_contract<Attr, HasScaleA, HasScaleB, ScaleA, A, ScaleB, B>(); \
validate_cube_ctrl_contract<Attr, /*IsAccForm=*/false>(); \
if constexpr (!is_shared_tile_v<A> && !is_shared_tile_v<B>) { \
asm volatile( \
PTO_MATMUL_HEADER(Opcode, PTO_FIXP_ATTR) \
Expand Down Expand Up @@ -6148,7 +6145,6 @@ PTO_SHARED_INLINE void Name(Dst &dst, A &a, ScaleA &scale_a, B &b, \
validate_matrix_accumulator_contract<Attr, Dst, Extra, A, B, true>(); \
else \
validate_matrix_bias_contract<Attr, Extra, A, B, true>(); \
validate_cube_ctrl_contract<Attr, IsAcc>(); \
if constexpr (!is_shared_tile_v<A> && !is_shared_tile_v<B>) { \
asm volatile( \
PTO_MATMUL_HEADER(Opcode, PTO_FIXP_ATTR) \
Expand Down
2 changes: 1 addition & 1 deletion test/tileop_api/compile.all
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ACTIVE_FIXTURES=(
TAdd_mask TAdd TAdds TAnd TLoad TStore TCvt TDiv TDivs TExp TMax TMaxs
TMov TMul TMuls TOr TRecip TRem TRowMax TRowSum TSqrt TSub TSubs TTrans
RangeSubview RangeAssemble SharedRange TileRegion TileArray TileArrayCube TileArrayAssemblyOffsets TileArrayRegionAsm TileRegionUnaryAssembly TileRegionUnary TileRegionBinary TileRegionBinaryAssembly TileRegionUnarySubviewAssembly TileRegionScalarAssembly TileRegionTCVTSubviewAssembly TileRegionSharedSubview TileRegionCubeSubview
ValidShapeImmediate ValidShapePerDim ValidShapePerDimSweep CubeInternalAcc TSELCanonical
ValidShapeImmediate ValidShapePerDim ValidShapePerDimSweep TSELCanonical
)

# Pre-v0.58 wrapper designs remain available to cpu_sim only and are not part
Expand Down
35 changes: 0 additions & 35 deletions test/tileop_api/src/CubeInternalAcc.cpp

This file was deleted.

33 changes: 0 additions & 33 deletions test/tileop_api/src/CubeInternalAccNegatives.cpp

This file was deleted.

Loading