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

Fixed missing stream in F# sample project. #1106

Merged
merged 1 commit into from
Oct 18, 2023
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
6 changes: 3 additions & 3 deletions Samples/SimpleFSharp/Program.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ---------------------------------------------------------------------------------------
// ILGPU Samples
// Copyright (c) 2017-2021 ILGPU Project
// Copyright (c) 2017-2023 ILGPU Project
// www.ilgpu.net
//
// File: Program.fs
Expand Down Expand Up @@ -28,10 +28,10 @@ let main _argv =
printfn "Performing operations on %O" accelerator

use stream = accelerator.CreateStream()
let kernel = accelerator.LoadAutoGroupedStreamKernel<_, _, _>(Program.MyKernel)
let kernel = accelerator.LoadAutoGroupedKernel<_, _, _>(Program.MyKernel)
use buffer = accelerator.Allocate1D<_>(1024L)

kernel.Invoke(Index1D(int(buffer.Length)), buffer.View, 42)
kernel.Invoke(stream, Index1D(int(buffer.Length)), buffer.View, 42)

// Reads data from the GPU buffer into a new CPU array.
// Implicitly calls stream.Synchronize() to ensure
Expand Down