Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 3,453 for switchn (0.34 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

    //===----------------------------------------------------------------------===//
    // tf_executor.SwitchN
    //===----------------------------------------------------------------------===//
    
    LogicalResult SwitchNOp::verify() {
      SwitchNOp switchn = *this;
      IntegerAttr num_outs = switchn->getAttrOfType<IntegerAttr>("num_outs");
      if (!num_outs)
        return switchn.emitOpError() << "expects a `num_outs` integer attribute";
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/tests/tf_executor_ops_invalid.mlir

    // -----
    
    // Check that a tf_executor._SwitchN parent is a graph.
    func.func @parent_is_graph(%arg0: tensor<*xf32>, %arg1: tensor<i32>) {
      "tf.some_op"() ({
         %1:6 = tf_executor._SwitchN %arg0, %arg1 of 5 : tensor<*xf32>
    // expected-error@-1 {{'tf_executor._SwitchN' op expects parent op 'tf_executor.graph'}}
      }) : () -> ()
      func.return
    }
    
    // -----
    
    // Check that switchN result numbers matches the num_out attribute.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Oct 19 01:12:10 UTC 2023
    - 28.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/deadness_analysis_test.cc

    }
    
    TEST(DeadnessAnalysisTest, AndOfOr) {
      Scope root = Scope::NewRootScope().ExitOnError();
    
      ops::Switch sw_0 = CreateSwitch(root, "0");
      ops::Switch sw_1 = CreateSwitch(root, "1");
      ops::Switch sw_2 = CreateSwitch(root, "2");
      ops::Switch sw_3 = CreateSwitch(root, "3");
    
      ops::Merge m0(root.WithOpName("m0"), {sw_0.output_false, sw_1.output_false});
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 06:59:07 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/tests/breakup-islands.mlir

          %print = "tf.Print"(%const) { message = "bla" } : (tensor<*xi32>) -> (tensor<*xi32>)
          tf_executor.yield %const : tensor<*xi32>
        }
        %switchn:4 = tf_executor._SwitchN %island#0, %arg1 of 3: tensor<*xi32>
        tf_executor.fetch %switchn#0 : tensor<*xi32>
      }
      func.return
    }
    
    // CHECK-LABEL: func @single_op_island_forward_block_arg
    // CHECK: %[[CONST:.*]], %{{.*}} = tf_executor.island wraps "tf.Const"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 31 08:59:10 UTC 2023
    - 28.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        rewriter.replaceOpWithNewOp<tf_executor::SwitchOp>(
            op, new_types, new_operands, op->getAttrs());
        return success();
      }
    };
    
    class ConvertSwitchNOp : public ConversionPattern {
     public:
      explicit ConvertSwitchNOp(MLIRContext *context)
          : ConversionPattern("tfg.SwitchN", PatternBenefit(1), context) {}
    
      LogicalResult matchAndRewrite(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_executor_ops.td

      let description = [{
        This is defined in TensorFlow as:
    
        REGISTER_OP("_SwitchN")
            .Input("data: T")
            .Input("output_index: int32")
            .Output("outputs: num_outs * T")
            .Attr("num_outs: int >= 1")
            .Attr("T: type")
            .SetShapeFn(SwitchNShape);
    
        For example:
          %2:6 = tf_executor.SwitchN %0, %1 of 5 : tensor<??xf32>
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 23 19:35:12 UTC 2023
    - 22K bytes
    - Viewed (0)
  7. src/cmd/go/internal/toolchain/switch.go

    	}
    }
    
    // NeedSwitch reports whether Switch would attempt to switch toolchains.
    func (s *Switcher) NeedSwitch() bool {
    	return s.TooNew != nil && (HasAuto() || HasPath())
    }
    
    // Switch decides whether to switch to a newer toolchain
    // to resolve any of the saved errors.
    // It switches if toolchain switches are permitted and there is at least one TooNewError.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/switch.go

    // expression switch.
    func walkSwitchExpr(sw *ir.SwitchStmt) {
    	lno := ir.SetPos(sw)
    
    	cond := sw.Tag
    	sw.Tag = nil
    
    	// convert switch {...} to switch true {...}
    	if cond == nil {
    		cond = ir.NewBool(base.Pos, true)
    		cond = typecheck.Expr(cond)
    		cond = typecheck.DefaultLit(cond, nil)
    	}
    
    	// Given "switch string(byteslice)",
    	// with all cases being side-effect free,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  9. test/switch6.go

    func f1(e interface{}) {
    	switch e {
    	default:
    	default: // ERROR "multiple defaults( in switch)?"
    	}
    	switch e.(type) {
    	default:
    	default: // ERROR "multiple defaults( in switch)?"
    	}
    }
    
    type I interface {
    	Foo()
    }
    
    type X int
    
    func (*X) Foo() {}
    func f2() {
    	var i I
    	switch i.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 24 17:04:15 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  10. test/switch2.go

    // Verify that erroneous switch statements are detected by the compiler.
    // Does not compile.
    
    package main
    
    func f() {
    	switch {
    	case 0; // ERROR "expecting := or = or : or comma|expected :"
    	}
    
    	switch {
    	case 0; // ERROR "expecting := or = or : or comma|expected :"
    	default:
    	}
    
    	switch {
    	case 0: case 0: default:
    	}
    
    	switch {
    	case 0: f(); case 0:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 01 22:37:04 UTC 2022
    - 775 bytes
    - Viewed (0)
Back to top