-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][fp64][SYCLLowerIR] Fix an issue when double type inside multip…
…le nested structs is not identified (#14523) There are cases where some instructions use data structures that contain double data type deeply nested inside multiple levels. Example: struct T1 { double x; }; struct T2 { struct T1 y; }; T2 x; In such case, the fp64 emulation support in SYCLPropagateAspectUsage pass was not correctly identifying T2 as a type that has doubles. This led to wrong behavior when adding fp64 aspect. This PR fixes the issue. Thanks --------- Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
- Loading branch information
Showing
6 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...st/check_device_code/optional_kernel_features/fp64-conv-emu-with-recursive-type-decls.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// UNSUPPORTED: cuda, hip | ||
|
||
// RUN: %clangxx -O0 -fsycl -fsycl-device-only -fsycl-targets=spir64_gen -fsycl-fp64-conv-emu %s -c -S -emit-llvm -o- | FileCheck %s | ||
|
||
// CHECK-NOT: define {{.*}} spir_kernel void @_ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_EUlvE_(){{.*}} !sycl_used_aspects | ||
|
||
// Tests if -fsycl-fp64-conv-emu option helps to correctly generate fp64 aspect | ||
// in the presence of possibly recursive type declaration. | ||
|
||
#include <sycl/sycl.hpp> | ||
|
||
struct T2; | ||
struct T1 { | ||
struct T2 *x; | ||
}; | ||
struct T2 { | ||
struct T1 *y; | ||
}; | ||
|
||
int main() { | ||
sycl::queue q; | ||
q.submit([&](sycl::handler &h) { | ||
h.single_task([=]() { | ||
struct T1 tmp1; | ||
struct T2 tmp2; | ||
}); | ||
}); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters