Updated docs for 0.4.0 release
This commit is contained in:
parent
0b221c9ebd
commit
06917b836b
4 changed files with 12 additions and 12 deletions
13
README.md
13
README.md
|
|
@ -95,22 +95,22 @@ int main() {
|
|||
{ tensorA, tensorB },
|
||||
std::vector<char>(shader.begin(), shader.end()));
|
||||
|
||||
// 4.1. Before submitting sequence batch we wait for the async operation
|
||||
mgr.evalOpAwaitDefault();
|
||||
|
||||
// 5. Create managed sequence to submit batch operations to the CPU
|
||||
std::shared_ptr<kp::Sequence> sq = mgr.getOrCreateManagedSequence("seq").lock();
|
||||
|
||||
// Explicitly begin recording batch commands
|
||||
// 5.1. Explicitly begin recording batch commands
|
||||
sq->begin();
|
||||
|
||||
// Record batch commands
|
||||
// 5.2. Record batch commands
|
||||
sq->record<kp::OpTensorSyncLocal({ tensorA });
|
||||
sq->record<kp::OpTensorSyncLocal({ tensorB });
|
||||
|
||||
// Explicitly stop recording batch commands
|
||||
// 5.3. Explicitly stop recording batch commands
|
||||
sq->end();
|
||||
|
||||
// Before submitting sequence batch we wait for the previous async operation
|
||||
mgr.evalOpAwaitDefault();
|
||||
|
||||
// 6. Map data back to host by running the sequence of batch operations
|
||||
sq->eval();
|
||||
|
||||
|
|
@ -134,6 +134,7 @@ int main() {
|
|||
### End-to-end examples
|
||||
|
||||
* [Machine Learning Logistic Regression Implementation](https://towardsdatascience.com/machine-learning-and-data-processing-in-the-gpu-with-vulkan-kompute-c9350e5e5d3a)
|
||||
* [Parallelizing GPU-intensive Workloads via Multi-Queue Operations](https://towardsdatascience.com/parallelizing-heavy-gpu-workloads-via-multi-queue-operations-50a38b15a1dc)
|
||||
* [Android NDK Mobile Kompute ML Application](https://towardsdatascience.com/gpu-accelerated-machine-learning-in-your-mobile-applications-using-the-android-ndk-vulkan-kompute-1e9da37b7617)
|
||||
* [Game Development Kompute ML in Godot Engine](https://towardsdatascience.com/supercharging-game-development-with-gpu-accelerated-ml-using-vulkan-kompute-the-godot-game-engine-4e75a84ea9f0)
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ copyright = '2020, The Institute for Ethical AI & Machine Learning'
|
|||
author = 'Alejandro Saucedo'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = '0.3.2'
|
||||
release = '0.4.0'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ End-to-end examples
|
|||
|
||||
|
||||
* `Machine Learning Logistic Regression Implementation <https://towardsdatascience.com/machine-learning-and-data-processing-in-the-gpu-with-vulkan-kompute-c9350e5e5d3a>`_
|
||||
* `Parallelizing GPU-intensive Workloads via Multi-Queue Operations [https://towardsdatascience.com/parallelizing-heavy-gpu-workloads-via-multi-queue-operations-50a38b15a1dc>`_
|
||||
* `Android NDK Mobile Kompute ML Application <https://towardsdatascience.com/gpu-accelerated-machine-learning-in-your-mobile-applications-using-the-android-ndk-vulkan-kompute-1e9da37b7617>`_
|
||||
* `Game Development Kompute ML in Godot Engine <https://towardsdatascience.com/supercharging-game-development-with-gpu-accelerated-ml-using-vulkan-kompute-the-godot-game-engine-4e75a84ea9f0>`_
|
||||
|
||||
|
|
@ -69,11 +70,7 @@ Pass compute shader data in glsl/hlsl text or compiled SPIR-V format (or as path
|
|||
std::vector<char>(shader.begin(), shader.end()));
|
||||
|
||||
// Sync the GPU memory back to the local tensor
|
||||
// You can run the job asynchronously with the Async function
|
||||
mgr.evalOpAsyncDefault<kp::OpTensorSyncLocal>({ tensorA, tensorB });
|
||||
|
||||
// Await for the asynchonous default sequence to finish
|
||||
mgr.evalOpAwaitDefault();
|
||||
mgr.evalOpDefault<kp::OpTensorSyncLocal>({ tensorA, tensorB });
|
||||
|
||||
// Prints the output which is A: { 0, 1, 2 } B: { 3, 4, 5 }
|
||||
std::cout << fmt::format("A: {}, B: {}",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ In this section we will cover the following points:
|
|||
* Asynchronous operation submission
|
||||
* Parallel processing of operations
|
||||
|
||||
You can also find the published `blog post on the topic using Kompute <https://towardsdatascience.com/parallelizing-heavy-gpu-workloads-via-multi-queue-operations-50a38b15a1dc>`_, which covers the points discussed in this section further.
|
||||
|
||||
Below is the architecture we'll be covering further in the parallel operations section through command submission across multiple family queues.
|
||||
|
||||
.. image:: ../images/queue-allocation.jpg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue