Function that returns a resource that can be produced on CPU only.
| 2663 | |
| 2664 | // Function that returns a resource that can be produced on CPU only. |
| 2665 | FunctionDef CPUResourceOutput() { |
| 2666 | return FDH::Create( |
| 2667 | // Name |
| 2668 | "CPUResourceOutput", |
| 2669 | // Args |
| 2670 | {"x: float"}, |
| 2671 | // Return values |
| 2672 | {"ds: resource", "x_out: float"}, |
| 2673 | // Attr def |
| 2674 | {}, |
| 2675 | // Nodes |
| 2676 | { |
| 2677 | {{"make_ds"}, "CreateDatasetCPU", {}}, |
| 2678 | }, |
| 2679 | {{"ds", "make_ds:o:0"}, {"x_out", "x"}}); |
| 2680 | } |
| 2681 | |
| 2682 | TEST_F(NestedPlacerTest, DeepDeviceConstraintsPropagated) { |
| 2683 | /* |