Skip to content

Commit

Permalink
Better error reporting. (Xilinx#342)
Browse files Browse the repository at this point in the history
* QDMA

* QDMA

* streaming support contd

* streaming support contd

* add missing file

* add missing file

* QDMA : hook in route_id and flow_id

* QDMA : hook in route_id and flow_id

* emove files mistakenly checked in

* emove files mistakenly checked in

* Remove files accidentally checked in.

* Remove files accidentally checked in.

* Some better error messages

* Improve error message

* Updates

* Extra sysinfo and path messages. Issue 314
  • Loading branch information
hcneema authored Sep 11, 2018
1 parent beec724 commit a5738de
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ docs/.doctrees
tags
*.mod
*.ko
*.nfs*
6 changes: 3 additions & 3 deletions src/runtime_src/driver/xclng/xrt/user_aws/shim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ namespace awsbwhal {
std::lock_guard<std::mutex> lock(awsbwhal::deviceListMutex);
if(xcldev::pci_device_scanner::device_list.size() == 0) {
xcldev::pci_device_scanner devices;
devices.scan(true);
devices.scan(false);
}

unsigned i = 0;
Expand Down Expand Up @@ -1134,7 +1134,7 @@ xclDeviceHandle xclOpen(unsigned deviceIndex, const char *logFileName, xclVerbos
/* workaround necessary to load a default afi and program with xclbin when device is in a cleared state */
xcldev::pci_device_scanner rescan;
rescan.clear_device_list();
rescan.scan( true );
rescan.scan(false);
for (unsigned int i=0; i<rescan.device_list.size(); i++) {
std::cout << "device[" << i << "].user_instance : " << rescan.device_list[ i ].user_instance << std::endl;
if (rescan.device_list[i].user_instance == 128) {
Expand Down Expand Up @@ -1294,7 +1294,7 @@ int xclBootFPGA(xclDeviceHandle handle)
if( retVal == 0 )
{
xcldev::pci_device_scanner devScanner;
devScanner.scan( true ); // rescan pci devices
devScanner.scan(false); // rescan pci devices
}

return retVal;
Expand Down
2 changes: 1 addition & 1 deletion src/runtime_src/driver/xclng/xrt/user_gem/shim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1762,7 +1762,7 @@ int xclBootFPGA(xclDeviceHandle handle)
if( retVal == 0 )
{
xcldev::pci_device_scanner devScanner;
devScanner.scan( true ); // rescan pci devices
devScanner.scan(false); // rescan pci devices
}

return retVal;
Expand Down
6 changes: 3 additions & 3 deletions src/runtime_src/xocl/api/clEnqueueNDRangeKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,14 @@ validOrError(cl_command_queue command_queue,
<< cu->get_name()
<< "\" of kernel \""
<< xkernel->get_name()
<< "\" for argument \"" << arg->get_name() << "\" "
<< "does not match the physical connectivity from the binary.\n"
<< "\" for argument name \"" << arg->get_name() << "\" "
<< "does not match the connectivity from the xclbin.\n"
<< "Memory bank mask specified for argument ";
if (mem_memidx_mask.any())
ostr << "is \"" << mem_memidx_mask << "\"";
else
ostr << "does not exist";
ostr << " while memory bank mask in binary is \"" << cu_memidx_mask << "\".";
ostr << " while memory bank mask in xclbin is \"" << cu_memidx_mask << "\".";
XOCL_DEBUG(std::cout,ostr.str(),"\n");
if (!is_sw_emulation()) // pr Amit
throw xocl::error(CL_MEM_OBJECT_ALLOCATION_FAILURE,ostr.str());
Expand Down
3 changes: 3 additions & 0 deletions src/runtime_src/xocl/core/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ get_stream(xrt::device::stream_flags flags, xrt::device::stream_attrs attrs, con
if(write && !(flags & CL_STREAM_WRITE_ONLY))
throw xocl::error(CL_INVALID_OPERATION,"Connecting a write stream to non-write stream, argument " + ext->flags);

if(mem.m_type != MEM_STREAMING)
throw xocl::error(CL_INVALID_OPERATION,"Connecting a streaming argument to non-streaming bank");

xocl(kernel)->set_argument(ext->flags,sizeof(cl_mem),nullptr);
}

Expand Down
Binary file not shown.
Binary file removed tests/unit_test/vadd_bank3/.host.cpp.swp
Binary file not shown.

0 comments on commit a5738de

Please sign in to comment.