Skip to content

Commit

Permalink
Fixed issue with enabling IO operations. (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoFtZ authored Nov 20, 2021
1 parent f772a7c commit 4e1ae75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Src/ILGPU/Context.Builder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ internal Builder()

/// <summary>
/// Enables all supported accelerators and puts the context into
/// auto-assertion mode via <see cref="AutoAssertions"/>.
/// auto-assertion mode via <see cref="AutoAssertions"/> and
/// auto-IO-operations mode via <see cref="AutoIOOperations"/>.
/// </summary>
/// <returns>The current builder instance.</returns>
public Builder Default() => AllAccelerators().AutoAssertions();
public Builder Default() =>
AllAccelerators().AutoAssertions().AutoIOOperations();

/// <summary>
/// Enables all supported accelerators.
Expand Down
1 change: 1 addition & 0 deletions Src/ILGPU/ContextProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ internal ContextProperties InstantiateProperties() =>
: DebugSymbolsMode.Disabled
: DebugSymbolsMode,
EnableAssertions = EnableAssertions,
EnableIOOperations = EnableIOOperations,
EnableKernelInformation = EnableKernelInformation,
EnableVerifier = EnableVerifier,
EnableParallelCodeGenerationInFrontend =
Expand Down
2 changes: 1 addition & 1 deletion Src/ILGPU/IR/Transformations/AcceleratorSpecializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private static void Specialize(
SpecializerData data,
WriteToOutput value)
{
if (data.EnableAssertions)
if (data.EnableIOOperations)
data.ToImplement.Add(value);
else
context.Remove(value);
Expand Down

0 comments on commit 4e1ae75

Please sign in to comment.