Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
radenmuaz committed Feb 18, 2024
1 parent d60bc97 commit 62f8bc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Or you can just copy `src/slope` to your projects.
1. Forward-mode, reverse-mode, and higher-order AD.

2. Just-in-time compilation, with interchangeable backends, supporting CPU, CUDA and Metal:
- [ONNX Runtime](https://onnxruntime.ai/) (ONNX graph); this is the default backend
- [IREE](https://iree.dev/) (StableHLO MLIR)
- [ONNX Runtime](https://onnxruntime.ai/) (ONNX)
- NumPy (CPU-only)
- NumPy (Python code)

3. Training and inference, examples:
- [MLP on MNIST](examples/nn/mnist_mlp.py)
Expand Down
17 changes: 1 addition & 16 deletions src/slope/__init__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
"""
.. include:: ../../README.md
"""
__all__ = ["core"]
__all__ = ["core", "nn", "operators", "procedures"]
__docformat__ = "markdown"
import os
from slope import core
import importlib
import numpy as np
np.set_printoptions(precision=5, threshold=1000, edgeitems=5, linewidth=120)
# SLOPE_BACKEND = os.environ.get("SLOPE_BACKEND", "iree")
SLOPE_BACKEND = os.environ.get("SLOPE_BACKEND", "onnxruntime")
# SLOPE_BACKEND = os.environ.get("SLOPE_BACKEND", "numpy")
# try:
core.set_backend(SLOPE_BACKEND)

# except Exception as e:
# import traceback

# traceback.print_stack()
# print(e)
# print(f"\n -- Warning: failed to set {SLOPE_BACKEND} as backend. Error above \n")


def __getattr__(attr):
if attr in (globals_dict := globals()):
core.dblog(
Expand Down

0 comments on commit 62f8bc7

Please sign in to comment.