Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 37 of 37 for get_attr (0.13 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy_test.go

    		t.Run(tc.name, func(t *testing.T) {
    			strategy := customResourceStrategy{selectableFieldSet: prepareSelectableFields(tc.selectableFields)}
    
    			_, fields, err := strategy.GetAttrs(tc.obj)
    			if err != nil {
    				t.Fatal(err)
    			}
    			if !reflect.DeepEqual(tc.expectFields, fields) {
    				t.Errorf("Expected fields '%+#v' but got '%+#v'", tc.expectFields, fields)
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/device_util_test.cc

      mlir::OwningOpRef<mlir::ModuleOp> module_ref =
          mlir::ModuleOp::create(mlir::UnknownLoc::get(&context));
    
      AddDevicesToOp(*module_ref, /*device_set=*/nullptr);
      EXPECT_EQ((*module_ref)->getAttr("tf.devices"), nullptr);
    }
    
    TEST(DeviceUtilTest, GetDevicesFromOpNoDevicesAttribute) {
      mlir::MLIRContext context;
      mlir::OwningOpRef<mlir::ModuleOp> module_ref =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc

          }
        }
    
        // Build the new float-versioned op.
        OperationState state(op->getLoc(), op->getName());
        state.operands = dequantized_inputs;
        state.types = result_types;
        state.attributes = op->getAttrs();
        state.successors = op->getSuccessors();
        builder->setInsertionPoint(op);
        Operation* new_op = builder->create(state);
    
        // Insert quantize ops for every outputs and rewrite.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc

        // OperationState so we can add regions to the new op.
        OperationState state(op->getLoc(), op->getName().getStringRef(), operands,
                             new_results, op->getAttrs(), op->getSuccessors());
        for (Region& region : op->getRegions()) {
          Region& new_region = *state.addRegion();
          rewriter.inlineRegionBefore(region, new_region, new_region.begin());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc

      // outlined module.
      for (func::FuncOp func : outlined_module.getOps<func::FuncOp>()) {
        func.walk([&](Operation *op) {
          for (NamedAttribute attr : op->getAttrs()) {
            if (auto symbol_ref =
                    mlir::dyn_cast<FlatSymbolRefAttr>(attr.getValue())) {
              MoveFuncOp(symbol_ref, symbol_table, outlined_symbol_table);
              continue;
            }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.h

    // Copies attributes that satisfy the given predicate from `from` to `to`.
    template <typename Predicate>
    void CopyAttributes(Operation *from, Operation *to, Predicate P) {
      for (const NamedAttribute &attr : from->getAttrs())
        if (P(attr)) to->setAttr(attr.getName(), attr.getValue());
    }
    
    // Copies attributes whose name begins with an _ from `from` to `to`.
    inline void CopyUnderscoredAttributes(Operation *from, Operation *to) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

            encoding.getBounds()[i] == ShapedType::kDynamic) {
          return false;
        }
      }
      return true;
    }
    
    bool HasSymbolRefAttr(Operation* op) {
      for (const auto& attr : op->getAttrs()) {
        Attribute attr_value = attr.getValue();
        if (mlir::isa<SymbolRefAttr>(attr_value)) {
          return true;
        } else if (auto array_attr = mlir::dyn_cast<ArrayAttr>(attr_value)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top