Master of Kernel Testing
MOKT is a library for data-driven testing of OpenCL kernels. It obtains valid inputs and outputs from TensorFlow models — this way, you can easily get test data for a wide variety of machine learning operations, ranging from primitives such as ReLU and element-wise addition to whole subgraphs, e.g. ResNet's bottleneck blocks.
Installation
Install using pip:
pip install mokt
Note that only Python 3 is supported.
Usage
Check out examples to see MOKT in action.
Data extraction
It is recommended that you read the data extraction design note to get familiar with the way MOKT interacts with TensorFlow.
The high-level data API is used as follows:
@TestData(
tf_checkpoint_dir='/path/to/checkpoint/dir',
tf_values={'input': 'operation/name:0', 'output': 'another/op:0'})
def my_test_func(test_data):
print(type(test_data['input'])) # <class 'numpy.ndarray'>
my_test_func()
Choosing the correct nodes for your tests is easier with TensorBoard, which visualizes the computational graph and shows helpful info, such as tensor shapes, operation names, etc.
Running OpenCL kernels
Execution is performed in a TestEnvironment, which conveniently wraps host state and handles data conversion (read the class documentation for more information).
You may of course choose to write your own specialized implementation and use this library for data extraction only.
Metadata
Release files for mokt 0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mokt-0.9.tar.gz | 6.0 kB | Without provenance | Details for mokt-0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mokt-0.9-py3-none-any.whl | Python 3 | none | any | Details for mokt-0.9-py3-none-any.whl |
Total release size: 13.1 kB
Release files / mokt-0.9.tar.gz
| Download URL | mokt-0.9.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddd6ccf6cbac1a1b05978242f9531453b131f5daad9622fee87de61563bb325e
|
|
BLAKE2b-256 checksum How to use checksums |
8e269b1cbc434d22724f5cb0e81eab5c1a3ec2361853bd43d74304112f0495bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6
|
Release files / mokt-0.9-py3-none-any.whl
| Download URL | mokt-0.9-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
004c480d274f9ba55730ea9b0db98b6e3ff4367148880c3f419f775221373db5
|
|
BLAKE2b-256 checksum How to use checksums |
9a6ceb1d9f0a5636300a2e3a9e03dd29058dd8748ee07d4938075498b8b2e4f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6
|
Security for mokt 0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.