Skip to content

Commit

Permalink
Streaming examples cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Sarkari authored and heeran-xilinx committed May 16, 2019
1 parent 2120597 commit 21794d1
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions getting_started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Example | Description | Key Concepts / Keywords
[host/streaming_k2k_vadd_vmul/][]|This is a simple kernel to kernel streaming Vector Add and Vector Multiply C Kernel design with 2 memory mapped input to kernel 1, 1 Stream output from kernel 1 to input of kernel 2, 1 memory mapped input to kernel 2, and 1 memory mapped output that demonstrates on how to process a stream of data for computation between two kernels.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - CL_STREAM_BLOCKING
[host/streaming_mm_mixed/][]|This is a simple streaming Vector Addition C Kernel design with 1 Stream input, 1 memory mapped input to the kernel, and 1 stream output that demonstrates on how to process a stream of data for computation along with OpenCL buffers.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - CL_STREAM_BLOCKING
[host/streaming_multi_cus/][]|This is a simple Vector Add C Kernel design with 2 Stream inputs and 1 Stream output that demonstrates on how to process an input stream of data for computation in an application using multiple compute units.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - Multiple Compute Units
[host/streaming_vadd/][]|This is a simple Vector Add C Kernel design with 2 Stream inputs and 1 Stream output that demonstrates on how to process an input stream of data for computation in an application.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - CL_STREAM_NONBLOCKING
[host/streaming_simple/][]|This is a simple Vector Add C Kernel design with 2 Stream inputs and 1 Stream output that demonstrates on how to process an input stream of data for computation in an application.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - CL_STREAM_NONBLOCKING
[host/sub_devices_c/][]|This example demonstrates how to create OpenCL subdevices which uses a single kernel multiple times in order to show how to handle each instance independently including independent buffers, command queues and sequencing.|__Key__ __Concepts__<br> - Sub Devices<br>__Keywords__<br> - cl_device_partition_property<br> - createSubDevices<br> - CL_DEVICE_PARTITION_EQUALLY
[kernel_to_gmem/burst_rw_c/][]|This is simple example of using AXI4-master interface for burst read and write|__Key__ __Concepts__<br> - burst access<br>__Keywords__<br> - memcpy<br> - max_read_burst_length<br> - max_write_burst_length
[kernel_to_gmem/burst_rw_ocl/][]|This is simple example of using AXI4-master interface for burst read and write|__Key__ __Concepts__<br> - burst access<br>__Keywords__<br> - param:compiler.interfaceWrBurstLen<br> - param:compiler.interfaceRdBurstLen
Expand Down Expand Up @@ -133,7 +133,7 @@ Example | Description | Key Concepts / Keywords
[host/streaming_k2k_vadd_vmul/]:host/streaming_k2k_vadd_vmul/
[host/streaming_mm_mixed/]:host/streaming_mm_mixed/
[host/streaming_multi_cus/]:host/streaming_multi_cus/
[host/streaming_vadd/]:host/streaming_vadd/
[host/streaming_simple/]:host/streaming_simple/
[host/sub_devices_c/]:host/sub_devices_c/
[kernel_to_gmem]:kernel_to_gmem
[kernel_to_gmem/burst_rw_c/]:kernel_to_gmem/burst_rw_c/
Expand Down
4 changes: 2 additions & 2 deletions getting_started/host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Example | Description | Key Concepts / Keywords
[streaming_k2k_vadd_vmul/][]|This is a simple kernel to kernel streaming Vector Add and Vector Multiply C Kernel design with 2 memory mapped input to kernel 1, 1 Stream output from kernel 1 to input of kernel 2, 1 memory mapped input to kernel 2, and 1 memory mapped output that demonstrates on how to process a stream of data for computation between two kernels.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - CL_STREAM_BLOCKING
[streaming_mm_mixed/][]|This is a simple streaming Vector Addition C Kernel design with 1 Stream input, 1 memory mapped input to the kernel, and 1 stream output that demonstrates on how to process a stream of data for computation along with OpenCL buffers.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - CL_STREAM_BLOCKING
[streaming_multi_cus/][]|This is a simple Vector Add C Kernel design with 2 Stream inputs and 1 Stream output that demonstrates on how to process an input stream of data for computation in an application using multiple compute units.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - Multiple Compute Units
[streaming_vadd/][]|This is a simple Vector Add C Kernel design with 2 Stream inputs and 1 Stream output that demonstrates on how to process an input stream of data for computation in an application.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - CL_STREAM_NONBLOCKING
[streaming_simple/][]|This is a simple Vector Add C Kernel design with 2 Stream inputs and 1 Stream output that demonstrates on how to process an input stream of data for computation in an application.|__Key__ __Concepts__<br> - Read/Write Stream<br> - Create/Release Stream<br>__Keywords__<br> - cl_stream<br> - CL_STREAM_EOT<br> - CL_STREAM_NONBLOCKING
[sub_devices_c/][]|This example demonstrates how to create OpenCL subdevices which uses a single kernel multiple times in order to show how to handle each instance independently including independent buffers, command queues and sequencing.|__Key__ __Concepts__<br> - Sub Devices<br>__Keywords__<br> - cl_device_partition_property<br> - createSubDevices<br> - CL_DEVICE_PARTITION_EQUALLY

[.]:.
Expand All @@ -44,5 +44,5 @@ Example | Description | Key Concepts / Keywords
[streaming_k2k_vadd_vmul/]:streaming_k2k_vadd_vmul/
[streaming_mm_mixed/]:streaming_mm_mixed/
[streaming_multi_cus/]:streaming_multi_cus/
[streaming_vadd/]:streaming_vadd/
[streaming_simple/]:streaming_simple/
[sub_devices_c/]:sub_devices_c/
2 changes: 1 addition & 1 deletion getting_started/host/streaming_multi_cus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ $(XCLBIN)/krnl_stream_vadd.$(TARGET).$(DSA).xo: src/krnl_stream_vadd.cpp
$(XOCC) $(CLFLAGS) --temp_dir $(BUILD_DIR_krnl_stream_vadd) -c -k krnl_stream_vadd -I'$(<D)' -o'$@' '$<'
$(XCLBIN)/krnl_stream_vadd.$(TARGET).$(DSA).xclbin: $(BINARY_CONTAINER_krnl_stream_vadd_OBJS)
mkdir -p $(XCLBIN)
$(XOCC) $(CLFLAGS) --temp_dir $(BUILD_DIR_krnl_stream_vadd) -l $(LDCLFLAGS) --nk krnl_stream_vadd:4:krnl_stream_vadd_1.krnl_stream_vadd_2.krnl_stream_vadd_3.krnl_stream_vadd_4 -o'$@' $(+)
$(XOCC) $(CLFLAGS) --temp_dir $(BUILD_DIR_krnl_stream_vadd) -l $(LDCLFLAGS) --nk krnl_stream_vadd:4:vadd_1.vadd_2.vadd_3.vadd_4 -o'$@' $(+)

# Building Host
$(EXECUTABLE): check-xrt $(HOST_SRCS) $(HOST_HDRS)
Expand Down
2 changes: 1 addition & 1 deletion getting_started/host/streaming_multi_cus/description.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{
"name": "krnl_stream_vadd",
"location": "src/krnl_stream_vadd.cpp",
"num_compute_units": "4:krnl_stream_vadd_1.krnl_stream_vadd_2.krnl_stream_vadd_3.krnl_stream_vadd_4"
"num_compute_units": "4:vadd_1.vadd_2.vadd_3.vadd_4"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions getting_started/host/streaming_multi_cus/src/host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ int main(int argc, char** argv)
std::vector<cl::Kernel> krnls(NCU);
for (int i = 0; i < NCU; i++) {
cu_id = std::to_string(i+1);
std::string krnl_name_full = krnl_name + ":{" + krnl_name + "_" + cu_id + "}";
std::string krnl_name_full = krnl_name + ":{" + "vadd_" + cu_id + "}";
printf("Creating a kernel [%s] for CU(%d)\n", krnl_name_full.c_str(), i);
OCL_CHECK(err, krnls[i] = cl::Kernel(program, krnl_name_full.c_str(), &err));
}
Expand Down Expand Up @@ -223,4 +223,4 @@ int main(int argc, char** argv)
xcl::Stream::releaseStream(write_stream_b[i]);
}
return !match;
}
}
File renamed without changes.

0 comments on commit 21794d1

Please sign in to comment.