@@ -219,6 +219,31 @@ function gpu_wrapper(
219219 )
220220end
221221
222+ function ml_gelu (
223+ input:: Value ;
224+ result= nothing :: Union{Nothing,IR.Type} ,
225+ gelu_approximation,
226+ location= Location (),
227+ )
228+ op_ty_results = IR. Type[]
229+ operands = Value[input,]
230+ owned_regions = Region[]
231+ successors = Block[]
232+ attributes = NamedAttribute[namedattribute (" gelu_approximation" , gelu_approximation),]
233+ ! isnothing (result) && push! (op_ty_results, result)
234+
235+ return create_operation (
236+ " enzymexla.ml.gelu" ,
237+ location;
238+ operands,
239+ owned_regions,
240+ successors,
241+ attributes,
242+ results= (length (op_ty_results) == 0 ? nothing : op_ty_results),
243+ result_inference= (length (op_ty_results) == 0 ? true : false ),
244+ )
245+ end
246+
222247function get_stream (; result:: IR.Type , location= Location ())
223248 op_ty_results = IR. Type[result,]
224249 operands = Value[]
@@ -491,6 +516,26 @@ function linalg_qr(
491516 )
492517end
493518
519+ function ml_relu (input:: Value ; result= nothing :: Union{Nothing,IR.Type} , location= Location ())
520+ op_ty_results = IR. Type[]
521+ operands = Value[input,]
522+ owned_regions = Region[]
523+ successors = Block[]
524+ attributes = NamedAttribute[]
525+ ! isnothing (result) && push! (op_ty_results, result)
526+
527+ return create_operation (
528+ " enzymexla.ml.relu" ,
529+ location;
530+ operands,
531+ owned_regions,
532+ successors,
533+ attributes,
534+ results= (length (op_ty_results) == 0 ? nothing : op_ty_results),
535+ result_inference= (length (op_ty_results) == 0 ? true : false ),
536+ )
537+ end
538+
494539function rotate (
495540 operand:: Value ;
496541 result= nothing :: Union{Nothing,IR.Type} ,
0 commit comments