Skip to content

Files

Latest commit

c68a94c · Apr 8, 2023

History

History
This branch is 28564 commits behind pytorch/pytorch:main.

api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 6, 2022
Sep 22, 2018
Jun 11, 2022
Mar 30, 2023
Dec 19, 2022
Jun 11, 2022
Jun 11, 2022
Dec 9, 2021
Jun 11, 2022
Sep 13, 2022
Jun 11, 2022
Oct 18, 2022
Jun 11, 2022
Jun 11, 2022
Aug 12, 2021
Dec 9, 2021
Jun 11, 2022
Jul 23, 2021
Jun 11, 2022
Jun 11, 2022
Jan 26, 2023
Jan 27, 2023
Jan 27, 2023
Mar 10, 2023
Jun 11, 2022
Sep 28, 2022
Nov 15, 2022
Oct 19, 2021
Jan 26, 2023
Jun 11, 2022
Aug 12, 2021
Jul 23, 2021
Jun 11, 2022
May 8, 2021
Jun 11, 2022
Oct 19, 2021
Apr 8, 2023
Jun 11, 2022
Nov 11, 2022
Jun 11, 2022
Oct 3, 2022
Jul 23, 2021
Oct 18, 2022
Apr 4, 2023
Jun 11, 2022
Jun 11, 2022
Jun 11, 2022
Jun 11, 2022
Jun 11, 2022
Jul 23, 2021
Jun 11, 2022

C++ Frontend Tests

In this folder live the tests for PyTorch's C++ Frontend. They use the GoogleTest test framework.

CUDA Tests

To make a test runnable only on platforms with CUDA, you should suffix your test with _CUDA, e.g.

TEST(MyTestSuite, MyTestCase_CUDA) { }

To make it runnable only on platforms with at least two CUDA machines, suffix it with _MultiCUDA instead of _CUDA, e.g.

TEST(MyTestSuite, MyTestCase_MultiCUDA) { }

There is logic in main.cpp that detects the availability and number of CUDA devices and supplies the appropriate negative filters to GoogleTest.

Integration Tests

Integration tests use the MNIST dataset. You must download it by running the following command from the PyTorch root folder:

$ python tools/download_mnist.py -d test/cpp/api/mnist

The required paths will be referenced as test/cpp/api/mnist/... in the test code, so you must run the integration tests from the PyTorch root folder.