Skip to content

Commit 9921245

Browse files
Regenerate MLIR Bindings (#1429)
Co-authored-by: enzyme-ci-bot[bot] <78882869+enzyme-ci-bot[bot]@users.noreply.github.com>
1 parent a1a343d commit 9921245

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

src/mlir/Dialects/EnzymeXLA.jl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,34 @@ function rotate(
519519
)
520520
end
521521

522+
function linalg_svd(
523+
input::Value;
524+
U::IR.Type,
525+
S::IR.Type,
526+
Vt::IR.Type,
527+
info::IR.Type,
528+
full=nothing,
529+
location=Location(),
530+
)
531+
op_ty_results = IR.Type[U, S, Vt, info]
532+
operands = Value[input,]
533+
owned_regions = Region[]
534+
successors = Block[]
535+
attributes = NamedAttribute[]
536+
!isnothing(full) && push!(attributes, namedattribute("full", full))
537+
538+
return create_operation(
539+
"enzymexla.linalg.svd",
540+
location;
541+
operands,
542+
owned_regions,
543+
successors,
544+
attributes,
545+
results=op_ty_results,
546+
result_inference=false,
547+
)
548+
end
549+
522550
function stream2token(source::Value; result::IR.Type, location=Location())
523551
op_ty_results = IR.Type[result,]
524552
operands = Value[source,]

src/mlir/Dialects/TPU.jl

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,25 @@ function erase_memref_layout(operand::Value; result::IR.Type, location=Location(
456456
)
457457
end
458458

459+
function extf(in::Value; out::IR.Type, location=Location())
460+
op_ty_results = IR.Type[out,]
461+
operands = Value[in,]
462+
owned_regions = Region[]
463+
successors = Block[]
464+
attributes = NamedAttribute[]
465+
466+
return create_operation(
467+
"tpu.extf",
468+
location;
469+
operands,
470+
owned_regions,
471+
successors,
472+
attributes,
473+
results=op_ty_results,
474+
result_inference=false,
475+
)
476+
end
477+
459478
function fptosi(input::Value; output::IR.Type, rounding_mode, location=Location())
460479
op_ty_results = IR.Type[output,]
461480
operands = Value[input,]
@@ -1382,6 +1401,25 @@ function transpose(vector::Value; result::IR.Type, permutation, location=Locatio
13821401
)
13831402
end
13841403

1404+
function truncf(in::Value; out::IR.Type, rounding_mode, location=Location())
1405+
op_ty_results = IR.Type[out,]
1406+
operands = Value[in,]
1407+
owned_regions = Region[]
1408+
successors = Block[]
1409+
attributes = NamedAttribute[namedattribute("rounding_mode", rounding_mode),]
1410+
1411+
return create_operation(
1412+
"tpu.truncf",
1413+
location;
1414+
operands,
1415+
owned_regions,
1416+
successors,
1417+
attributes,
1418+
results=op_ty_results,
1419+
result_inference=false,
1420+
)
1421+
end
1422+
13851423
function unpack_subelements(
13861424
source::Value; output::IR.Type, index, pack_format, location=Location()
13871425
)

0 commit comments

Comments
 (0)