Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for getDictionaryAttr (0.25 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/device_util_test.cc

          mlir::ModuleOp::create(mlir::UnknownLoc::get(&context));
      mlir::Builder builder(*module_ref);
      (*module_ref)
          ->setAttr("tf.devices",
                    builder.getDictionaryAttr(builder.getNamedAttr(
                        "bad_device", builder.getDictionaryAttr({}))));
    
      mlir::TF::RuntimeDevices devices;
      EXPECT_TRUE(mlir::failed(GetDevicesFromOp(*module_ref, &devices)));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc

      attrs.push_back(rewriter.getNamedAttr("output_quantization_axis",
                                            rewriter.getI64IntegerAttr(quant_dim)));
    
      op->setAttrs(rewriter.getDictionaryAttr(attrs));
    
      return success();
    }
    
    // This LogicalResult covers both the hybrid and fully quantized op cases.
    LogicalResult FillAttributesForUniformQuantizedConvolutionOp(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/translate_utils.cc

          b.getI32ArrayAttr(llvm::ArrayRef<int32_t>(
              versions.bad_consumers().data(),
              versions.bad_consumers().data() + versions.bad_consumers().size())));
      module->setAttr("tf.versions",
                      b.getDictionaryAttr(llvm::ArrayRef<mlir::NamedAttribute>(
                          {producer, min_consumer, bad_consumers})));
    }
    
    mlir::LogicalResult ExtractTfVersions(mlir::ModuleOp module,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/convert_attr.cc

                                ConvertAttributeValue(func_attr.second, builder));
            attrs.push_back(builder->getNamedAttr(func_attr.first, attr));
          }
          auto func_attrs = builder->getDictionaryAttr(attrs);
          return mlir::TF::FuncAttr::get(builder->getContext(), value.func().name(),
                                         func_attrs);
        }
        default:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/python/jax_to_tfl_flatbuffer.cc

      // Jax wrapped the output nodes in a tuple, so it's pretty hard to us
      // to tell the output at this point, we will set the output at the export
      // phase.
      main_func->setAttr("tf.entry_function", builder.getDictionaryAttr(attrs));
    
      // StableHLO Quantizer is not supported for JAX input models, so
      // quantization_py_function_lib is set to nullptr.
      auto status = internal::ConvertMLIRToTFLiteFlatBuffer(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 11 19:29:56 UTC 2024
    - 8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/device_util.cc

        } else {
          auto metadata = builder.getUnitAttr();
          devices.push_back(builder.getNamedAttr(name, metadata));
        }
      }
    
      op->setAttr(kDevicesAttr, builder.getDictionaryAttr(devices));
    }
    
    mlir::LogicalResult GetDevicesFromOp(mlir::Operation* op,
                                         mlir::TF::RuntimeDevices* devices) {
      auto devices_attr = op->getAttr(kDevicesAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/xla_call_module_serialization.cc

            kCalledIndexAttrName, builder.getI64IntegerAttr(it->second)));
    
        // Set the `tf.backend_config` attribute to the `new_config`.
        op->setAttr(kTfBackendConfigAttrName,
                    builder.getDictionaryAttr(new_config));
    
        return WalkResult::advance();
      });
      if (result.wasInterrupted()) {
        return failure();
      }
    
      return builder.getArrayAttr(function_list);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc

                StringAttr::get(func.getContext(), it->getSecond())));
          }
        }
      }
    
      llvm::SmallVector<DictionaryAttr, 8> tmp;
      for (const auto& res : result_attrs) {
        tmp.push_back(builder.getDictionaryAttr(res));
      }
      func.setAllResultAttrs(tmp);
    }
    
    #define GEN_PASS_DEF_TPUDEVICEPROPAGATIONPASS
    #include "tensorflow/compiler/mlir/tensorflow/transforms/tf_passes.h.inc"
    
    struct TPUDevicePropagation
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_restore_op.cc

          /*shape=*/{}, /*elementType=*/builder.getType<TF::StringType>());
      const auto file_prefix_attr = builder.getStringAttr(kTfFilePrefix);
      const auto arg_attrs = builder.getDictionaryAttr({builder.getNamedAttr(
          kTfSavedModelIndexPathAttr, builder.getArrayAttr({file_prefix_attr}))});
    
      const int insert_idx = func_op.getNumArguments();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Mar 12 06:02:20 UTC 2023
    - 9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc

        SymbolTable table(root);
        (void)table.renameToUnique(func, {});
    
        rewriter.setInsertionPointAfter(output_mul);
        auto composite_attrs = rewriter.getDictionaryAttr(
            {rewriter.getNamedAttr("approx", rewriter.getBoolAttr(false))});
        auto composite_op = rewriter.create<stablehlo::CompositeOp>(
            output_mul.getLoc(), func.getResultTypes()[0],
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
Back to top