File tree Expand file tree Collapse file tree 3 files changed +17
-14
lines changed Expand file tree Collapse file tree 3 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -121,14 +121,7 @@ mlir::Type MLIRModule::ParseType(std::string string) {
121
121
}
122
122
123
123
mlir::Attribute MLIRModule::ParseAttribute (std::string string) {
124
- auto attribute = mlir::parseAttribute (string, context_);
125
-
126
- if (attribute == nullptr ) {
127
- std::cerr << " Unable to parse MLIR attribute: " << string << std::endl;
128
- exit (1 );
129
- }
130
-
131
- return attribute;
124
+ return mlir::parseAttribute (string, context_);
132
125
}
133
126
134
127
} // namespace exla
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class MLIRModule {
58
58
59
59
std::string ToString ();
60
60
61
- // Note: returns nullptr if the parsing fails
61
+ // Note: ParseAttribute and ParseType return nullptr if the parsing fails
62
62
mlir::Type ParseType (std::string);
63
63
mlir::Attribute ParseAttribute (std::string);
64
64
Original file line number Diff line number Diff line change @@ -750,11 +750,21 @@ defmodule EXLA.MLIR.Value do
750
750
751
751
call_target_name =
752
752
case op_type do
753
- { :f , 32 } -> "qr_cpu_custom_call_f32"
754
- { :f , 64 } -> "qr_cpu_custom_call_f64"
755
- { :f , 16 } -> "qr_cpu_custom_call_f16"
756
- { :bf , 16 } -> "qr_cpu_custom_call_bf16"
757
- type -> raise "QR decomposition not supported for type #{ inspect ( type ) } "
753
+ { :f , 32 } ->
754
+ "qr_cpu_custom_call_f32"
755
+
756
+ { :f , 64 } ->
757
+ "qr_cpu_custom_call_f64"
758
+
759
+ { :f , 16 } ->
760
+ "qr_cpu_custom_call_f16"
761
+
762
+ { :bf , 16 } ->
763
+ "qr_cpu_custom_call_bf16"
764
+
765
+ type ->
766
+ # Due to matching on EXLA.Defn, we are sure that the device here is always :host
767
+ raise "QR decomposition not supported on :host device for type #{ inspect ( type ) } "
758
768
end
759
769
760
770
attributes = [
You can’t perform that action at this time.
0 commit comments