Skip to content

Commit bc72454

Browse files
PawelJurekpszymich
authored andcommitted
Revert: Raytracing: change intel_get_implicit_dispatch_globals function to use subdevice (aka Tile) id
On multi-tile GPUs with implicit scaling enabled, when we use implicit rtDispatchGlobals pointer the runtime will send an array of pointers, one per tile. This change makes intel_get_implicit_dispatch_globals return the correct pointer for current tile.
1 parent 297ce4d commit bc72454

File tree

7 files changed

+6
-28
lines changed

7 files changed

+6
-28
lines changed

IGC/AdaptorOCL/ocl_igc_shared/raytracing/constants.h

Lines changed: 0 additions & 14 deletions
This file was deleted.

IGC/BiFModule/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ set(IGC_BUILD__BIF_OCL_COMMON_INC_DIRS
449449
"${IGC_OPTION__BIF_SRC_OCL_DIR}/Languages/OpenCL"
450450
"${IGC_OPTION__BIF_SRC_OCL_DIR}/Languages/OpenCL/PointerSize"
451451
"${IGC_OPTION__BIF_SRC_OCL_DIR}/Headers"
452-
"${CMAKE_CURRENT_SOURCE_DIR}/../AdaptorOCL/ocl_igc_shared"
453452
"${CMAKE_CURRENT_SOURCE_DIR}/../AdaptorOCL/ocl_igc_shared/device_enqueue"
454453
)
455454

IGC/BiFModule/Headers/spirv.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5485,8 +5485,5 @@ void SPIRV_OVERLOADABLE SPIRV_OCL_BUILTIN(prefetch, _p1v16f64_i64, )( global dou
54855485
uint __builtin_spirv_OpReadClockKHR_i32_i32(uint scope);
54865486
ulong __builtin_spirv_OpReadClockKHR_i64_i32(uint scope);
54875487

5488-
int SPIRV_OVERLOADABLE SPIRV_BUILTIN_NO_OP(BuiltInSubDeviceIDINTEL, , )(void);
5489-
int SPIRV_OVERLOADABLE SPIRV_BUILTIN_NO_OP(GlobalHWThreadIDINTEL, , )(void);
5490-
54915488
#endif // __SPIRV_H__
54925489

IGC/BiFModule/Implementation/IGCBiF_Intrinsics.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ void* __builtin_IB_intel_get_global_btd_stack(rtglobals_t rt_dispatch_globals);
868868
rtfence_t __builtin_IB_intel_dispatch_trace_ray_query(
869869
rtglobals_t rt_dispatch_globals, uint bvh_level, uint traceTayCtrl);
870870
void __builtin_IB_intel_rt_sync(rtfence_t fence);
871-
global void* __builtin_IB_intel_get_rt_global_buffer();
871+
global void* __builtin_IB_intel_get_implicit_dispatch_globals();
872872
#endif // cl_intel_pvc_rt_validation
873873

874874
void __builtin_IB_hdc_uncompressed_write_uchar(__global uchar *buf, uchar val);

IGC/BiFModule/Languages/OpenCL/PreRelease/IBiF_raytracing.cl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ SPDX-License-Identifier: MIT
88

99
#ifdef cl_intel_pvc_rt_validation
1010

11-
#include "raytracing/constants.h"
12-
1311
void* intel_get_rt_stack( rtglobals_t rt_dispatch_globals ) {
1412
return __builtin_IB_intel_get_rt_stack(rt_dispatch_globals);
1513
}
@@ -32,9 +30,7 @@ void intel_rt_sync(rtfence_t fence) {
3230
}
3331

3432
global void* intel_get_implicit_dispatch_globals() {
35-
global char* globalBuffer = __builtin_IB_intel_get_rt_global_buffer();
36-
int subDeviceID = SPIRV_BUILTIN_NO_OP(BuiltInSubDeviceIDINTEL, , )();
37-
return globalBuffer + subDeviceID * DISPATCH_GLOBALS_STRIDE;
33+
return __builtin_IB_intel_get_implicit_dispatch_globals();
3834
}
3935

4036
#endif

IGC/Compiler/Optimizer/OpenCLPasses/RayTracing/ResolveOCLRaytracingBuiltins.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace {
3838
{"__builtin_IB_intel_get_global_btd_stack", &ResolveOCLRaytracingBuiltins::handleGetGlobalBTDStack },
3939
{"__builtin_IB_intel_dispatch_trace_ray_query", &ResolveOCLRaytracingBuiltins::handleDispatchTraceRayQuery },
4040
{"__builtin_IB_intel_rt_sync", &ResolveOCLRaytracingBuiltins::handleRTSync },
41-
{"__builtin_IB_intel_get_rt_global_buffer", &ResolveOCLRaytracingBuiltins::handleGetRTGlobalBuffer },
41+
{"__builtin_IB_intel_get_implicit_dispatch_globals", &ResolveOCLRaytracingBuiltins::handleGetImplicitDG },
4242
};
4343
}
4444

@@ -332,12 +332,12 @@ void ResolveOCLRaytracingBuiltins::handleRTSync(CallInst& callInst) {
332332

333333
/*
334334
Handler for
335-
void __builtin_IB_intel_get_rt_global_buffer();
335+
void __builtin_IB_intel_get_implicit_dispatch_globals();
336336
337337
Description:
338338
Returns IMPLICIT_RT_GLOBAL_BUFFER implicit argument.
339339
*/
340-
void ResolveOCLRaytracingBuiltins::handleGetRTGlobalBuffer(llvm::CallInst& callInst) {
340+
void ResolveOCLRaytracingBuiltins::handleGetImplicitDG(llvm::CallInst& callInst) {
341341
RTBuilder rtbuilder(m_builder->getContext(), *m_pCtx);
342342
rtbuilder.SetInsertPoint(&callInst);
343343
auto v = rtbuilder.getGlobalBufferPtr();

IGC/Compiler/Optimizer/OpenCLPasses/RayTracing/ResolveOCLRaytracingBuiltins.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace IGC {
4949
void handleGetGlobalBTDStack(llvm::CallInst& callInst);
5050
void handleDispatchTraceRayQuery(llvm::CallInst& callInst);
5151
void handleRTSync(llvm::CallInst& callInst);
52-
void handleGetRTGlobalBuffer(llvm::CallInst& callInst);
52+
void handleGetImplicitDG(llvm::CallInst& callInst);
5353

5454
private:
5555
CodeGenContext* m_pCtx;

0 commit comments

Comments
 (0)