testListIntSumReturnTuple() — pytorch Function Reference
Architecture documentation for the testListIntSumReturnTuple() function in PytorchTestBase.java from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 79a4f525_c8b3_1121_0c29_125727461d5b["testListIntSumReturnTuple()"] fd3711c0_c2a1_0848_309d_ba2ef1be4466["loadModel()"] 79a4f525_c8b3_1121_0c29_125727461d5b -->|calls| fd3711c0_c2a1_0848_309d_ba2ef1be4466 style 79a4f525_c8b3_1121_0c29_125727461d5b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
android/pytorch_android/src/androidTest/java/org/pytorch/PytorchTestBase.java lines 153–178
@Test
public void testListIntSumReturnTuple() throws IOException {
final Module module = loadModel(TEST_MODULE_ASSET_NAME);
for (int n : new int[] {0, 1, 128}) {
long[] a = new long[n];
long sum = 0;
for (int i = 0; i < n; i++) {
a[i] = i;
sum += a[i];
}
final IValue input = IValue.listFrom(a);
assertTrue(input.isLongList());
final IValue output = module.runMethod("listIntSumReturnTuple", input);
assertTrue(output.isTuple());
assertTrue(2 == output.toTuple().length);
IValue output0 = output.toTuple()[0];
IValue output1 = output.toTuple()[1];
assertArrayEquals(a, output0.toLongList());
assertTrue(sum == output1.toLong());
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testListIntSumReturnTuple() do?
testListIntSumReturnTuple() is a function in the pytorch codebase.
What does testListIntSumReturnTuple() call?
testListIntSumReturnTuple() calls 1 function(s): loadModel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free