Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo fixes for hatlib 0.0.11 #36

Merged
merged 1 commit into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ No installation is required. This will launch a Jupyter notebook with the quicks
import numpy as np

# load the package
hat_package = hat.load("hello_accera.hat")
_, functions = hat.load("hello_accera.hat")

# call one of the functions with test inputs
A_test = np.random.rand(512, 512).astype(np.float32)
B_test = np.random.rand(512, 512).astype(np.float32)
C_test = np.zeros((512, 512)).astype(np.float32)
C_numpy = np.maximum(C_test + A_test @ B_test, 0.0)

matmul_relu = hat_package["matmul_relu_fusion_transformed"]
matmul_relu = functions["matmul_relu_fusion_transformed"]
matmul_relu(A_test, B_test, C_test)

# check correctness
Expand Down
6 changes: 3 additions & 3 deletions docs/demos/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@
"import numpy as np\n",
"\n",
"# load the package\n",
"hat_package = hat.load(\"hello_accera.hat\")\n",
"_, functions = hat.load(\"hello_accera.hat\")\n",
"\n",
"# call one of the functions with test inputs\n",
"A_test = np.random.rand(512, 512).astype(np.float32)\n",
"B_test = np.random.rand(512, 512).astype(np.float32)\n",
"C_test = np.zeros((512, 512)).astype(np.float32)\n",
"C_numpy = np.maximum(C_test + A_test @ B_test, 0.0)\n",
"\n",
"matmul_relu = hat_package[\"matmul_relu_fusion_transformed\"]\n",
"matmul_relu = functions[\"matmul_relu_fusion_transformed\"]\n",
"matmul_relu(A_test, B_test, C_test)\n",
"\n",
"# check correctness\n",
Expand Down Expand Up @@ -183,7 +183,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down