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

Updated README and fixed a syntax error on C++'s example #206

Merged
merged 4 commits into from
Apr 10, 2021
Merged
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

![GitHub](https://img.shields.io/badge/Version-0.5.2-green.svg)
![GitHub](https://img.shields.io/badge/Version-0.7.0-green.svg)
![GitHub](https://img.shields.io/badge/C++-14—20-purple.svg)
![GitHub](https://img.shields.io/badge/Build-cmake-red.svg)
![GitHub](https://img.shields.io/badge/Python-3.5—3.8-blue.svg)
![GitHub](https://img.shields.io/badge/Python-3.5—3.9-blue.svg)
![GitHub](https://img.shields.io/badge/License-Apache-black.svg)

<table>
Expand Down Expand Up @@ -74,7 +74,7 @@ void kompute(const std::string& shader) {
kp::Constants pushConstsB({ 3.0 });

auto algorithm = mgr.algorithm(params,
kp::Shader::compile_source(shader),
kp::Shader::compileSource(shader),
workgroup,
specConsts,
pushConstsA);
Expand All @@ -88,17 +88,17 @@ void kompute(const std::string& shader) {
->eval(); // Evaluates only last recorded operation

// 5. Sync results from the GPU asynchronously
sq = mgr.sequence()
auto sq = mgr.sequence();
sq->evalAsync<kp::OpTensorSyncLocal>(params);

// ... Do other work asynchronously whilst GPU finishes

sq->evalAwait();

// Prints the first output which is: { 4, 8, 12 }
for (const float& elem : tensorOutA->data()) std::cout << elem << " ";
for (const float& elem : tensorOutA->vector()) std::cout << elem << " ";
// Prints the second output which is: { 10, 10, 10 }
for (const float& elem : tensorOutB->data()) std::cout << elem << " ";
for (const float& elem : tensorOutB->vector()) std::cout << elem << " ";

} // Manages / releases all CPU and GPU memory resources

Expand Down