Skip to content

Commit da0d7eb

Browse files
pkwasnie-inteligcbot
authored andcommitted
enable implicit args optimizations by default
Enables implicit args optimizations (ShortImplicitPayloadHeader, RemoveUnusedIdImplicitArguments) by default.
1 parent 97d10b5 commit da0d7eb

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

IGC/Compiler/CISACodeGen/Platform.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,9 @@ bool allowRemovingUnusedImplicitArguments() const
19191919
if (IGC_IS_FLAG_SET(RemoveUnusedIdImplicitArguments))
19201920
return IGC_IS_FLAG_ENABLED(RemoveUnusedIdImplicitArguments);
19211921

1922+
if (!supportsZEBin())
1923+
return false;
1924+
19221925
return isCoreChildOf(IGFX_XE_HP_CORE);
19231926
}
19241927

IGC/common/igc_flags.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,8 @@ DECLARE_IGC_REGKEY_ENUM(SupportUniformPrivateMemorySpace, -1, \
943943
" 0 - force disabled" \
944944
" 1 - force enabled", \
945945
TRIBOOL_OPTIONS, true)
946-
DECLARE_IGC_REGKEY(bool, ShortImplicitPayloadHeader, false, "Replaces implicit kernel argument 8xi32 payloadHeader with 3xi32 globalOffset", true)
947-
DECLARE_IGC_REGKEY(bool, RemoveUnusedIdImplicitArguments, false, "Remove implicit arguments: global_id_offset (payloadHeader) and/or enqueued_local_size if unused. " \
946+
DECLARE_IGC_REGKEY(bool, ShortImplicitPayloadHeader, true, "Replaces implicit kernel argument 8xi32 payloadHeader with 3xi32 globalOffset", true)
947+
DECLARE_IGC_REGKEY(bool, RemoveUnusedIdImplicitArguments, true, "Remove implicit arguments: global_id_offset (payloadHeader) and/or enqueued_local_size if unused. " \
948948
"Useful if kernel doesn't use global id.", true)
949949

950950
DECLARE_IGC_GROUP("Generating precompiled headers")

IGC/ocloc_tests/features/constant_buffer/noinline.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ SPDX-License-Identifier: MIT
1111
// Verify that implicit kernel arguments are not removed for kernels with subroutines.
1212
// Arguments can be removed for stackcalls.
1313

14-
// RUN: ocloc compile -file %s -device pvc -options "-cl-std=CL2.0 -igc_opts 'EnableStackCallFuncCall=0, RemoveUnusedIdImplicitArguments=1, ShortImplicitPayloadHeader=1, DumpZEInfoToConsole=1'" 2>&1 | FileCheck %s --check-prefix=CHECK-SUBROUTINE
15-
// RUN: ocloc compile -file %s -device pvc -options "-cl-std=CL2.0 -igc_opts 'EnableStackCallFuncCall=1, RemoveUnusedIdImplicitArguments=1, ShortImplicitPayloadHeader=1, DumpZEInfoToConsole=1'" 2>&1 | FileCheck %s --check-prefix=CHECK-STACKCALL
14+
// RUN: ocloc compile -file %s -device pvc -options "-cl-std=CL2.0 -igc_opts 'EnableStackCallFuncCall=0, ShortImplicitPayloadHeader=1, DumpZEInfoToConsole=1'" 2>&1 | FileCheck %s --check-prefix=CHECK-SUBROUTINE
15+
// RUN: ocloc compile -file %s -device pvc -options "-cl-std=CL2.0 -igc_opts 'EnableStackCallFuncCall=1, ShortImplicitPayloadHeader=1, DumpZEInfoToConsole=1'" 2>&1 | FileCheck %s --check-prefix=CHECK-STACKCALL
1616

1717
// CHECK-SUBROUTINE: name: kernel_that_must_have_args
1818
// CHECK-SUBROUTINE: payload_arguments:

0 commit comments

Comments
 (0)