Skip to content

Files

Latest commit

38bbe37 · Dec 3, 2024

History

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

api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 25, 2024
Sep 22, 2018
Jun 11, 2022
Jul 15, 2024
Oct 28, 2024
Oct 4, 2024
Sep 24, 2023
Dec 9, 2021
Jun 11, 2022
Oct 28, 2024
Jun 11, 2022
Oct 18, 2022
Jun 11, 2022
Jun 11, 2022
Jul 31, 2024
Oct 19, 2024
May 17, 2024
Jun 11, 2022
May 14, 2024
Jun 11, 2022
Jun 11, 2022
Oct 28, 2024
Jan 27, 2023
Jan 27, 2023
Oct 19, 2024
Jun 11, 2022
Sep 28, 2022
Feb 16, 2024
Oct 19, 2024
Oct 19, 2024
Oct 19, 2024
Jun 11, 2022
Apr 5, 2024
Jul 23, 2021
Oct 28, 2024
May 8, 2021
Jun 11, 2022
Oct 19, 2021
Dec 3, 2024
Jun 11, 2022
May 31, 2024
Jun 11, 2022
Oct 26, 2024
Jul 23, 2021
Aug 15, 2023
Apr 4, 2023
Jun 11, 2022
Oct 16, 2023
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.