You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will create a `build` directory and run CMake to generate the necessary build files.
126
+
127
+
To test if the build environment is working, you can run the following command:
128
+
```bash
129
+
$ make MyExample && make TorchTestBridge
130
+
131
+
$ ./MyExample
132
+
Hello, world!
133
+
a: ndarray([[ 0, 1, 2],
134
+
[ 3, 4, 5],
135
+
[ 6, 7, 8]],
136
+
shape = (3, 3),
137
+
rank = 2)
138
+
139
+
b: ndarray([[ 0, 1, 2],
140
+
[ 3, 4, 5],
141
+
[ 6, 7, 8]],
142
+
shape = (3, 3),
143
+
rank = 2)
144
+
145
+
c: ndarray([[15, 18, 21],
146
+
[42, 54, 66],
147
+
[69, 90, 111]],
148
+
shape = (3, 3),
149
+
rank = 2)
150
+
151
+
$ ./TorchTestBridge
152
+
Input: [1, 3, 10, 10]
153
+
Output: [1, 3, 10, 10]
154
+
155
+
```
156
+
157
+
The first command will compile the `MyExample` program, which is a simple "Hello, world!" program that uses ChAI. The second command will compile the `TorchTestBridge` program, which tests the PyTorch interop functionality of ChAI.
158
+
159
+
See `docker-dev-run.md` for instructions on how to run the examples in a Docker container. This is useful if either of these build steps fail on your system.
160
+
161
+
162
+
You may also try
163
+
```bash
164
+
$ cd examples/vgg
165
+
$ python3 dump_weights.py
166
+
$ cd ../..
167
+
$ make vgg
168
+
$ ./vgg images/frog.jpg
169
+
VGG Example Directory: .../ChAI/examples/vgg
170
+
Loading labels from .../ChAI/examples/vgg/imagenet/LOC_synset_mapping.txt
171
+
Loaded 1000 labels.
172
+
Constructing VGG16 model.
173
+
Constructed VGG16 model.
174
+
Loading VGG16 model weights.
175
+
Loaded VGG16 model.
176
+
Read file: .../ChAI/build/images/frog.jpg with ext: jpg
0 commit comments