Skip to content

Commit 7ca0d6f

Browse files
authored
Fixed typos in the fpga_mem properties that are emited (#11968)
The property values now align with the [SPV_INTEL_fpga_memory_attributes](https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/INTEL/SPV_INTEL_fpga_memory_attributes.asciidoc) spec.
1 parent 838bfe2 commit 7ca0d6f

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

llvm/lib/SYCLLowerIR/CompileTimeProperties.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SYCL_COMPILE_TIME_PROPERTY("sycl-latency-constraint", 6173,
4242
SYCL_COMPILE_TIME_PROPERTY("sycl-datapath", 5825, DecorValueTy::none)
4343
SYCL_COMPILE_TIME_PROPERTY("sycl-resource", 5826, DecorValueTy::string)
4444
SYCL_COMPILE_TIME_PROPERTY("sycl-num-banks", 5827, DecorValueTy::uint32)
45-
SYCL_COMPILE_TIME_PROPERTY("sycl-ram-stitching", 5836, DecorValueTy::boolean)
45+
SYCL_COMPILE_TIME_PROPERTY("sycl-ram-stitching", 5836, DecorValueTy::uint32)
4646
SYCL_COMPILE_TIME_PROPERTY("sycl-max-private-copies", 5829,
4747
DecorValueTy::uint32)
4848
SYCL_COMPILE_TIME_PROPERTY("sycl-num-replicates", 5832, DecorValueTy::uint32)

sycl/include/sycl/ext/intel/experimental/fpga_mem/properties.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ template <intel::experimental::resource_enum Value>
256256
struct PropertyMetaInfo<intel::experimental::resource_key::value_t<Value>> {
257257
static constexpr const char *name = "sycl-resource";
258258
static constexpr const char *value =
259-
((Value == intel::experimental::resource_enum::mlab) ? "mlab"
260-
: "block_ram");
259+
((Value == intel::experimental::resource_enum::mlab) ? "MLAB"
260+
: "BLOCK_RAM");
261261
};
262262
template <size_t Value>
263263
struct PropertyMetaInfo<intel::experimental::num_banks_key::value_t<Value>> {
@@ -296,8 +296,8 @@ struct PropertyMetaInfo<
296296
static constexpr const char *name = "sycl-ram-stitching";
297297
// enum to bool conversion to match with the SPIR-V decoration
298298
// ForcePow2DepthINTEL
299-
static constexpr bool value =
300-
(Value == intel::experimental::ram_stitching_enum::max_fmax);
299+
static constexpr size_t value = static_cast<size_t>(
300+
Value == intel::experimental::ram_stitching_enum::max_fmax);
301301
};
302302
template <size_t Value>
303303
struct PropertyMetaInfo<

sycl/test/check_device_code/fpga_mem_global.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ int main() {
9090
// CHECK: ![[single_pumped_md]] = !{![[single_pumped:[0-9]*]], ![[mem_default]]}
9191
// CHECK: ![[single_pumped]] = !{i32 5830}
9292
// CHECK: ![[mlab_md]] = !{![[mlab:[0-9]*]]}
93-
// CHECK: ![[mlab]] = !{i32 5826, !"mlab"}
93+
// CHECK: ![[mlab]] = !{i32 5826, !"MLAB"}
9494
// CHECK: ![[simple_dual_port_md]] = !{![[simple_dual_port:[0-9]*]], ![[mem_default]]}
9595
// CHECK: ![[simple_dual_port]] = !{i32 5833}
9696
// CHECK: ![[true_dual_port_md]] = !{![[true_dual_port:[0-9]*]], ![[mem_default]]}
9797
// CHECK: ![[true_dual_port]] = !{i32 5885}
9898
// CHECK: ![[block_ram_md]] = !{![[block_ram:[0-9]*]]}
99-
// CHECK: ![[block_ram]] = !{i32 5826, !"block_ram"}
99+
// CHECK: ![[block_ram]] = !{i32 5826, !"BLOCK_RAM"}
100100
// CHECK: ![[banks_md]] = !{![[banks:[0-9]*]], ![[mem_default]]}
101101
// CHECK: ![[banks]] = !{i32 5827, i32 4}
102102
// CHECK: ![[stride_md]] = !{![[mem_default]], ![[stride:[0-9]*]]}

sycl/test/check_device_code/fpga_mem_local.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ namespace intel = sycl::ext::intel::experimental; // for fpga_mem
1010
namespace oneapi = sycl::ext::oneapi::experimental; // for properties
1111

1212
// CHECK: [[MemoryINTEL:@.*]] = private unnamed_addr addrspace(1) constant [17 x i8] c"{5826:\22DEFAULT\22}\00"
13-
// CHECK: [[ForcePow2DepthINTEL_FALSE:@.*]] = private unnamed_addr addrspace(1) constant [31 x i8] c"{5826:\22DEFAULT\22}{5836:\22false\22}\00"
14-
// CHECK: [[ForcePow2DepthINTEL_TRUE:@.*]] = private unnamed_addr addrspace(1) constant [30 x i8] c"{5826:\22DEFAULT\22}{5836:\22true\22}\00"
13+
// CHECK: [[ForcePow2DepthINTEL_FALSE:@.*]] = private unnamed_addr addrspace(1) constant [27 x i8] c"{5826:\22DEFAULT\22}{5836:\220\22}\00"
14+
// CHECK: [[ForcePow2DepthINTEL_TRUE:@.*]] = private unnamed_addr addrspace(1) constant [27 x i8] c"{5826:\22DEFAULT\22}{5836:\221\22}\00"
1515
// CHECK: [[DoublepumpINTEL:@.*]] = private unnamed_addr addrspace(1) constant [23 x i8] c"{5826:\22DEFAULT\22}{5831}\00"
1616
// CHECK: [[SinglepumpINTEL:@.*]] = private unnamed_addr addrspace(1) constant [23 x i8] c"{5826:\22DEFAULT\22}{5830}\00"
17-
// CHECK: [[MemoryINTEL_mlab:@.*]] = private unnamed_addr addrspace(1) constant [30 x i8] c"{5826:\22DEFAULT\22}{5826:\22mlab\22}\00"
17+
// CHECK: [[MemoryINTEL_mlab:@.*]] = private unnamed_addr addrspace(1) constant [30 x i8] c"{5826:\22DEFAULT\22}{5826:\22MLAB\22}\00"
1818
// CHECK: [[SimpleDualPortINTEL:@.*]] = private unnamed_addr addrspace(1) constant [23 x i8] c"{5826:\22DEFAULT\22}{5833}\00"
1919
// CHECK: [[TrueDualPortINTEL:@.*]] = private unnamed_addr addrspace(1) constant [23 x i8] c"{5826:\22DEFAULT\22}{5885}\00"
20-
// CHECK: [[MemoryINTEL_block_ram:@.*]] = private unnamed_addr addrspace(1) constant [35 x i8] c"{5826:\22DEFAULT\22}{5826:\22block_ram\22}\00"
20+
// CHECK: [[MemoryINTEL_block_ram:@.*]] = private unnamed_addr addrspace(1) constant [35 x i8] c"{5826:\22DEFAULT\22}{5826:\22BLOCK_RAM\22}\00"
2121
// CHECK: [[NumbanksINTEL:@.*]] = private unnamed_addr addrspace(1) constant [27 x i8] c"{5826:\22DEFAULT\22}{5827:\224\22}\00"
2222
// CHECK: [[StridesizeINTEL:@.*]] = private unnamed_addr addrspace(1) constant [27 x i8] c"{5826:\22DEFAULT\22}{5883:\222\22}\00"
2323
// CHECK: [[WordsizeINTEL:@.*]] = private unnamed_addr addrspace(1) constant [27 x i8] c"{5826:\22DEFAULT\22}{5884:\228\22}\00"

0 commit comments

Comments
 (0)