Ver código fonte

Add MLIR support (#1044)

Lutz Roeder 3 semanas atrás
pai
commit
0fb293b9f2
3 arquivos alterados com 212 adições e 160 exclusões
  1. 30 1
      source/mlir-metadata.json
  2. 154 152
      source/mlir.js
  3. 28 7
      tools/mlir

+ 30 - 1
source/mlir-metadata.json

@@ -62275,6 +62275,19 @@
     ],
     "assemblyFormat": "attr-dict $value `:` type($value)"
   },
+  {
+    "name": "test.format_types_match_optional",
+    "operands": [
+      { "name": "optional", "type": "Optional<AnyType>" }
+    ],
+    "results": [
+      { "name": "result", "type": "Optional<AnyType>" }
+    ],
+    "traits": [
+      { "type": "TypesMatchWith<'result', 'optional', '$_self'>" }
+    ],
+    "assemblyFormat": "(`(` $optional^ `:` type($result) `)`)? attr-dict"
+  },
   {
     "name": "test.format_types_match_var",
     "operands": [
@@ -66847,7 +66860,8 @@
       { "name": "low_priority_max_enqueued_batches", "type": "DefaultValuedOptionalAttr<I64Attr, 0>" },
       { "name": "mixed_priority_policy", "type": "DefaultValuedOptionalAttr<TF_AnyStrAttrOf<[ low_priority_padding_with_max_batch_size, low_priority_padding_with_next_allowed_batch_size, priority_isolation, priority_merge ]>, \"low_priority_padding_with_max_batch_size\">" },
       { "name": "batch_padding_policy", "type": "DefaultValuedOptionalAttr<TF_AnyStrAttrOf<[ PAD_UP, BATCH_DOWN, MINIMIZE_TPU_COST_PER_REQUEST ]>, \"PAD_UP\">" },
-      { "name": "enable_large_batch_splitting", "type": "DefaultValuedOptionalAttr<BoolAttr, false>" }
+      { "name": "enable_large_batch_splitting", "type": "DefaultValuedOptionalAttr<BoolAttr, false>" },
+      { "name": "enable_priority_aware_batch_scheduler", "type": "DefaultValuedOptionalAttr<BoolAttr, false>" }
     ],
     "traits": [
       { "type": "AttrSizedOperandSegments" }
@@ -114913,6 +114927,21 @@
     ],
     "assemblyFormat": "`(` $fabric_connection_manager `,` $dst_mesh_id `,` $dst_dev_id `,` $dst_addr `,` $src_addr `,` $len_bytes `)` attr-dict `:` functional-type(operands, results)"
   },
+  {
+    "name": "ttkernel.experimental::fabric_mcast_fast_write_any_len",
+    "summary": "FabricMulticastWriteOp",
+    "description": "FabricMulticastWriteOp",
+    "operands": [
+      { "name": "fabric_connection_manager", "type": "TTKernel_FabricConnectionManager" },
+      { "name": "dst_mesh_id", "type": "I16" },
+      { "name": "dst_dev_id_start", "type": "I16" },
+      { "name": "dst_dev_id_end", "type": "I16" },
+      { "name": "dst_addr", "type": "TTKernel_NocAddr" },
+      { "name": "src_addr", "type": "I32" },
+      { "name": "len_bytes", "type": "I32" }
+    ],
+    "assemblyFormat": "`(` $fabric_connection_manager `,` $dst_mesh_id `,` $dst_dev_id_start `,` $dst_dev_id_end `,` $dst_addr `,` $src_addr `,` $len_bytes `)` attr-dict `:` functional-type(operands, results)"
+  },
   {
     "name": "ttkernel.experimental::get_device_id_from_logical_mesh_position",
     "summary": "GetDeviceIdFromLogicalMeshPosition",

Diferenças do arquivo suprimidas por serem muito extensas
+ 154 - 152
source/mlir.js


+ 28 - 7
tools/mlir

@@ -45,18 +45,39 @@ sync() {
         IFS='|' read -r url branch dir root <<< "${entry}"
         if [ ! -d "${dir}" ]; then
             if [ -n "${root}" ]; then
-                git clone --quiet --depth=1 --branch "${branch}" --single-branch --filter=blob:none --sparse "${url}" "${dir}" >/dev/null 2>&1
-                git -C "${dir}" sparse-checkout set ${root} >/dev/null 2>&1
+                if ! stderr=$(git clone --quiet --depth=1 --branch "${branch}" --single-branch --filter=blob:none --sparse "${url}" "${dir}" 2>&1); then
+                    echo "${stderr}" >&2
+                    exit 1
+                fi
+                if ! stderr=$(git -C "${dir}" sparse-checkout set ${root} 2>&1); then
+                    echo "${stderr}" >&2
+                    exit 1
+                fi
             else
-                git clone --quiet --depth=1 --branch "${branch}" --single-branch "${url}" "${dir}"
+                if ! stderr=$(git clone --quiet --depth=1 --branch "${branch}" --single-branch "${url}" "${dir}" 2>&1); then
+                    echo "${stderr}" >&2
+                    exit 1
+                fi
             fi
         else
             if [ -n "${root}" ]; then
-                git -C "${dir}" sparse-checkout set ${root} >/dev/null 2>&1
+                if ! stderr=$(git -C "${dir}" sparse-checkout set ${root} 2>&1); then
+                    echo "${stderr}" >&2
+                    exit 1
+                fi
+            fi
+            if ! stderr=$(git -C "${dir}" fetch --quiet --depth=1 origin "${branch}" 2>&1); then
+                echo "${stderr}" >&2
+                exit 1
+            fi
+            if ! stderr=$(git -C "${dir}" reset --quiet --hard FETCH_HEAD 2>&1); then
+                echo "${stderr}" >&2
+                exit 1
+            fi
+            if ! stderr=$(git -C "${dir}" gc --quiet --prune=all 2>&1); then
+                echo "${stderr}" >&2
+                exit 1
             fi
-            git -C "${dir}" fetch --quiet --depth=1 origin "${branch}"
-            git -C "${dir}" reset --quiet --hard FETCH_HEAD >/dev/null 2>&1
-            git -C "${dir}" gc --quiet --prune=all
         fi
     done
     mkdir -p "${src_dir}/_/llvm-project/mlir/include/mlir/Interfaces"

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff