Skip to content

Commit 1db37fc

Browse files
manuelcandalesfacebook-github-bot
authored andcommitted
Add setup.py and .gitignore
Summary: Install `facto` in your virtual environment by running: ``` python3 setup.py install ``` Once installed, you'll be able to import inputgen and specdb ``` from facto import inputgen from facto import specdb ``` Reviewed By: zonglinpeng Differential Revision: D68641949 fbshipit-source-id: 0a6aafedd0910ea38685d1340d16738cd7fbe1fc
1 parent 1a1bd0b commit 1db37fc

File tree

4 files changed

+49
-2
lines changed

4 files changed

+49
-2
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Python build artifacts
2+
__pycache__/
3+
*.py[cod]
4+
*.pyo
5+
*.pyd
6+
*.so
7+
8+
# Setuptools build directories
9+
build/
10+
dist/
11+
*.egg-info/
12+
*.egg
13+
14+
# Virtual environments (if any)
15+
env/
16+
.venv/
17+
venv/
18+
19+
# System-specific files
20+
.DS_Store
21+
Thumbs.db

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ Here is an [overview](inputgen/overview.md) of InputGen
1212

1313
SpecDB is a [database](specdb/db.py#L30) of specifications covering most of the Core ATen Ops. They have been developed using the ATen CPU kernels as a reference.
1414

15+
## Instalation
16+
```
17+
git clone https://github.com/pytorch-labs/FACTO.git
18+
cd FACTO
19+
python3 setup.py install
20+
```
21+
1522
## Example Usage
1623

1724
The code below is a minimal example to test add.Tensor using FACTO.
1825
```python
1926
import torch
20-
from inputgen.argtuple.gen import ArgumentTupleGenerator
21-
from specdb.db import SpecDictDB
27+
from facto.inputgen.argtuple.gen import ArgumentTupleGenerator
28+
from facto.specdb.db import SpecDictDB
2229

2330
# Retrieve the specification from SpecDB
2431
spec = SpecDictDB["add.Tensor"]

facto/__init__.py

Whitespace-only changes.

setup.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from setuptools import find_packages, setup
2+
3+
setup(
4+
name="facto",
5+
version="0.1.0",
6+
author="Manuel Candales",
7+
description="Framework for Algorithmic Correctness Testing of Operators",
8+
long_description=open("README.md").read(),
9+
long_description_content_type="text/markdown",
10+
url="https://github.com/pytorch-labs/FACTO",
11+
packages=find_packages(include=["facto", "facto.*"]),
12+
classifiers=[
13+
"Programming Language :: Python :: 3",
14+
"License :: OSI Approved :: BSD 3-Clause License",
15+
"Operating System :: OS Independent",
16+
],
17+
python_requires=">=3.8",
18+
install_requires=["torch"],
19+
)

0 commit comments

Comments
 (0)