diff --git a/sparse/Jenkinsfile b/sparse/Jenkinsfile index 133b872f45..c0e2560951 100644 --- a/sparse/Jenkinsfile +++ b/sparse/Jenkinsfile @@ -2,4 +2,4 @@ VitisLibPipeline (branch: 'next', libname: 'xf_sparse', TARGETS: 'hls_csim:hls_csynth:hls_cosim:vitis_sw_emu:vitis_hw_emu:vitis_hw_build', upstream_dependencies: 'xf_blas,next,../blas; xf_hpc,next,../hpc', - devtest: 'RunDeploy.sh', TOOLVERSION: '2021.2_stable_latest') + devtest: 'RunDeploy.sh', TOOLVERSION: '2022.1_stable_latest') diff --git a/sparse/L1/meta/api.json b/sparse/L1/meta/api.json new file mode 100644 index 0000000000..8eaf6b3d9c --- /dev/null +++ b/sparse/L1/meta/api.json @@ -0,0 +1,1218 @@ +{ + "schema": "vitis_libraries_api_list_schema-1.0", + "api_list": [ + { + "api_name": "std::ostream& xf::sparse::operator<<", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "std::ostream& xf::sparse::operator<<", + "display_name": "operator<<", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_DataType", + "type": "typename" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + }, + { + "name": "t_IndexBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "ap_uint xf::sparse::getRowBank", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "ap_uint xf::sparse::getRowBank", + "display_name": "getRowBank", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int" + }, + { + "name": "t_IndexType", + "type": "typename" + } + ], + "ports": [] + } + }, + { + "api_name": "ap_uint xf::sparse::getRowOffset", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "ap_uint xf::sparse::getRowOffset", + "display_name": "getRowOffset", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int" + }, + { + "name": "t_LogParGroups", + "type": "unsigned int" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_IndexBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::duplicateStream", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::duplicateStream", + "display_name": "duplicateStream", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataType", + "type": "typename" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + }, + { + "name": "t_NumCopys", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::getColPtrPair", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::getColPtrPair", + "display_name": "getColPtrPair", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_IndexBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::getColPtrPairDist", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::getColPtrPairDist", + "display_name": "getColPtrPairDist", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_IndexBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::splitStream", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::splitStream", + "display_name": "splitStream", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataType", + "type": "typename" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::genColSelContr", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::genColSelContr", + "display_name": "genColSelContr", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_IndexBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::selColVal", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::selColVal", + "display_name": "selColVal", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataType", + "type": "typename" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_IndexBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::xBarMergeCol", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::xBarMergeCol", + "display_name": "xBarMergeCol", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataType", + "type": "typename" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::xBarCol", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::xBarCol", + "display_name": "xBarCol", + "brief": "xBarCol function that distributes input col values to the dedicated banks according to their col index pointers", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int", + "description": "log2 of the parallelly processed entries in the input/output vector stream" + }, + { + "name": "t_DataType", + "type": "typename", + "description": "the data type of the matrix and vector entries" + }, + { + "name": "t_IndexType", + "type": "typename", + "description": "the data type of the indicies" + }, + { + "name": "t_DataBits", + "type": "unsigned int", + "description": "the number of bits for storing the data" + }, + { + "name": "t_IndexBits", + "type": "unsigned int", + "description": "the number of bits for storing the indices" + } + ], + "ports": [ + { + "name": "p_colPtrBlocks", + "direction": "", + "type": "const unsigned int" + }, + { + "name": "p_nnzBlocks", + "direction": "", + "type": "const unsigned int" + }, + { + "name": "p_colPtrStr", + "direction": "", + "type": "hls::stream< ap_uint< t_IndexBits *(1<< t_LogParEntries)> > &" + }, + { + "name": "p_colValStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *(1<< t_LogParEntries)> > &" + }, + { + "name": "p_nnzColValStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *(1<< t_LogParEntries)> > &" + } + ] + } + }, + { + "api_name": "xf::sparse::formRowEntries", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::formRowEntries", + "display_name": "formRowEntries", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataType", + "type": "typename" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + }, + { + "name": "t_IndexBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::xBarRowSplit", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::xBarRowSplit", + "display_name": "xBarRowSplit", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataType", + "type": "typename" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + }, + { + "name": "t_IndexBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::xBarRowMerge", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::xBarRowMerge", + "display_name": "xBarRowMerge", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataType", + "type": "typename" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + }, + { + "name": "t_IndexBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::xBarRow", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::xBarRow", + "display_name": "xBarRow", + "brief": "xBarRow function that multiplies input NNZs' values with input vectors and distributes the results to the dedicated banks according to their row indices", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_LogParEntries", + "type": "unsigned int", + "description": "log2 of the parallelly processed entries in the input/output vector stream" + }, + { + "name": "t_DataType", + "type": "typename", + "description": "the data type of the matrix and vector entries" + }, + { + "name": "t_IndexType", + "type": "typename", + "description": "the data type of the indicies" + }, + { + "name": "t_DataBits", + "type": "unsigned int", + "description": "the number of bits for storing the data" + }, + { + "name": "t_IndexBits", + "type": "unsigned int", + "description": "the number of bits for storing the indices" + } + ], + "ports": [ + { + "name": "p_nnzBlocks", + "direction": "", + "type": "const unsigned int" + }, + { + "name": "p_nnzValStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *(1<< t_LogParEntries)> > &" + }, + { + "name": "p_nnzColValStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *(1<< t_LogParEntries)> > &" + }, + { + "name": "p_rowIndexStr", + "direction": "", + "type": "hls::stream< ap_uint< t_IndexBits *(1<< t_LogParEntries)> > &" + }, + { + "name": "p_rowEntryStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits+t_IndexBits > >[1<< t_LogParEntries]," + }, + { + "name": "p_isEndStr", + "direction": "", + "type": "hls::stream< ap_uint< 1 > >" + } + ] + } + }, + { + "api_name": "xf::sparse::rowMemAcc", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::rowMemAcc", + "display_name": "rowMemAcc", + "brief": "", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxRowBlocks", + "type": "unsigned int" + }, + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataType", + "type": "typename" + }, + { + "name": "t_IndexType", + "type": "typename" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + }, + { + "name": "t_RowOffsetBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::rowAgg", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::rowAgg", + "display_name": "rowAgg", + "brief": "rowAgg function that aggregates multiple row entry streams into one row entry stream", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_ParEntries", + "type": "unsigned int", + "description": "the parallelly processed entries in the input/output vector stream" + }, + { + "name": "t_ParGroups", + "type": "unsigned int", + "description": "the number of parallel accumulation paths" + }, + { + "name": "t_DataType", + "type": "typename", + "description": "the data type of the matrix and vector entries" + }, + { + "name": "t_IndexType", + "type": "typename", + "description": "the data type of the indicies" + }, + { + "name": "t_DataBits", + "type": "unsigned int", + "description": "the number of bits for storing the data" + } + ], + "ports": [ + { + "name": "p_rowBlocks", + "direction": "", + "type": "const unsigned int" + }, + { + "name": "p_rowValStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits > >[t_ParEntries]," + }, + { + "name": "p_rowAggStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *t_ParEntries > > &p_rowAggSt" + } + ] + } + }, + { + "api_name": "xf::sparse::cscRow", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::cscRow", + "display_name": "cscRow", + "brief": "cscRow function that returns the multiplication results of a sparse matrix and a dense vector", + "target_domain": "", + "header_file_name": [ + "cscmv.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxRowBlocks", + "type": "unsigned int", + "description": "the maximum number of row entrie blocks buffered onchip per PE" + }, + { + "name": "t_LogParEntries", + "type": "unsigned int", + "description": "log2 of the parallelly processed entries in the input/output vector stream" + }, + { + "name": "t_LogParGroups", + "type": "unsigned int", + "description": "log2 of the number of parallel accumulation paths" + }, + { + "name": "t_DataType", + "type": "typename", + "description": "the data type of the matrix and vector entries" + }, + { + "name": "t_IndexType", + "type": "typename", + "description": "the data type of the indicies" + }, + { + "name": "t_DataBits", + "type": "unsigned int", + "description": "the number of bits for storing the data" + }, + { + "name": "t_IndexBits", + "type": "unsigned int", + "description": "the number of bits for storing the indices" + } + ], + "ports": [ + { + "name": "p_nnzBlocks", + "direction": "", + "type": "const unsigned int" + }, + { + "name": "p_rowBlocks", + "direction": "", + "type": "const unsigned int" + }, + { + "name": "p_nnzValStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *(1<< t_LogParEntries)> > &" + }, + { + "name": "p_nnzColValStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *(1<< t_LogParEntries)> > &" + }, + { + "name": "p_rowIndexStr", + "direction": "", + "type": "hls::stream< ap_uint< t_IndexBits *(1<< t_LogParEntries)> > &" + }, + { + "name": "p_rowAggStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *(1<< t_LogParEntries)> > &" + } + ] + } + }, + { + "api_name": "xf::sparse::decFwdColParam", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::decFwdColParam", + "display_name": "decFwdColParam", + "brief": "", + "target_domain": "", + "header_file_name": [ + "moverL1.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxColParBlocks", + "type": "unsigned int" + }, + { + "name": "t_ParBlocks4Param", + "type": "unsigned int" + }, + { + "name": "t_HbmChannels", + "type": "unsigned int" + }, + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::decColParam", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::decColParam", + "display_name": "decColParam", + "brief": "", + "target_domain": "", + "header_file_name": [ + "moverL1.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxColParBlocks", + "type": "unsigned int" + }, + { + "name": "t_ParBlocks4Param", + "type": "unsigned int" + }, + { + "name": "t_HbmChannels", + "type": "unsigned int" + }, + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::dispColVec", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::dispColVec", + "display_name": "dispColVec", + "brief": "dispColVec function that forward and copy input column vector and parameters", + "target_domain": "", + "header_file_name": [ + "moverL1.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxColParBlocks", + "type": "unsigned int", + "description": "the maximum number of parallel processed column blocks buffered in on-chip memory" + }, + { + "name": "t_ParBlocks4Param", + "type": "unsigned int", + "description": "the number of parallelly processed parameter blocks" + }, + { + "name": "t_HbmChannels", + "type": "unsigned int", + "description": "number of HBM channels" + }, + { + "name": "t_ParEntries", + "type": "unsigned int", + "description": "parallelly processed entries" + }, + { + "name": "t_DataBits", + "type": "unsigned int", + "description": "number of bits used to store each entry" + } + ], + "ports": [ + { + "name": "t_chId", + "direction": "", + "type": "const unsigned int" + }, + { + "name": "p_datStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *t_ParEntries > > &" + }, + { + "name": "p_datFwdStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *t_ParEntries > > &" + }, + { + "name": "p_datOutStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *t_ParEntries > > &" + } + ] + } + }, + { + "api_name": "xf::sparse::dispColVecSink", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::dispColVecSink", + "display_name": "dispColVecSink", + "brief": "", + "target_domain": "", + "header_file_name": [ + "moverL1.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxColParBlocks", + "type": "unsigned int" + }, + { + "name": "t_ParBlocks4Param", + "type": "unsigned int" + }, + { + "name": "t_HbmChannels", + "type": "unsigned int" + }, + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::dispCol", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::dispCol", + "display_name": "dispCol", + "brief": "dispCol function that dispatchs input column vectors accross parallel CUs for computing SpMV simultaneously", + "target_domain": "", + "header_file_name": [ + "moverL1.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxColParBlocks", + "type": "unsigned int", + "description": "the maximum number of parallelly processed column vector entries in the on-chip buffer" + }, + { + "name": "t_ParBlocks4Param", + "type": "unsigned int", + "description": "the number of parallelly processed parameter blocks" + }, + { + "name": "t_HbmChannels", + "type": "unsigned int", + "description": "number of HBM channels" + }, + { + "name": "t_ParEntries", + "type": "unsigned int", + "description": "parallelly processed entries" + }, + { + "name": "t_DataBits", + "type": "unsigned int", + "description": "number of bits used to store each entry" + } + ], + "ports": [ + { + "name": "p_datStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *t_ParEntries > > &" + }, + { + "name": "p_datOutStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *t_ParEntries > >" + } + ] + } + }, + { + "api_name": "xf::sparse::dispNnzColStep", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::dispNnzColStep", + "display_name": "dispNnzColStep", + "brief": "", + "target_domain": "", + "header_file_name": [ + "moverL1.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxColParBlocks", + "type": "unsigned int" + }, + { + "name": "t_ParBlocks4Param", + "type": "unsigned int" + }, + { + "name": "t_HbmChannels", + "type": "unsigned int" + }, + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::dispNnzColStepDup", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::dispNnzColStepDup", + "display_name": "dispNnzColStepDup", + "brief": "", + "target_domain": "", + "header_file_name": [ + "moverL1.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxColParBlocks", + "type": "unsigned int" + }, + { + "name": "t_ParBlocks4Param", + "type": "unsigned int" + }, + { + "name": "t_HbmChannels", + "type": "unsigned int" + }, + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::dispNnzColSink", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::dispNnzColSink", + "display_name": "dispNnzColSink", + "brief": "", + "target_domain": "", + "header_file_name": [ + "moverL1.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxColParBlocks", + "type": "unsigned int" + }, + { + "name": "t_ParBlocks4Param", + "type": "unsigned int" + }, + { + "name": "t_HbmChannels", + "type": "unsigned int" + }, + { + "name": "t_ParEntries", + "type": "unsigned int" + }, + { + "name": "t_DataBits", + "type": "unsigned int" + } + ], + "ports": [] + } + }, + { + "api_name": "xf::sparse::dispNnzCol", + "spec": { + "schema": "vitis_libraries_api_list_schema-1.0", + "api_name": "xf::sparse::dispNnzCol", + "display_name": "dispNnzCol", + "brief": "dispNnzCol function that dispatchs NNZ Col pointer entries accross parallel compute CUs", + "target_domain": "", + "header_file_name": [ + "moverL1.hpp" + ], + "search_paths": [ + "L1/include/hw/xf_sparse" + ], + "instance": "function", + "parameters": [ + { + "name": "t_MaxColParBlocks", + "type": "unsigned int", + "description": "the maximum number of parallelly processed column entries in the on-chip buffer" + }, + { + "name": "t_ParBlocks4Param", + "type": "unsigned int", + "description": "the number of parallelly processed parameter blocks" + }, + { + "name": "t_HbmChannels", + "type": "unsigned int", + "description": "number of HBM channels" + }, + { + "name": "t_ParEntries", + "type": "unsigned int", + "description": "parallelly processed entries" + }, + { + "name": "t_DataBits", + "type": "unsigned int", + "description": "number of bits used to store each entry" + } + ], + "ports": [ + { + "name": "p_datStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *t_ParEntries > > &" + }, + { + "name": "p_datOutStr", + "direction": "", + "type": "hls::stream< ap_uint< t_DataBits *t_ParEntries > >" + } + ] + } + } + ], + "target_domain": "" +} \ No newline at end of file diff --git a/sparse/L1/tests/hw/cscRow/description.json b/sparse/L1/tests/hw/cscRow/description.json index c28ea6d74d..408e11b8c8 100644 --- a/sparse/L1/tests/hw/cscRow/description.json +++ b/sparse/L1/tests/hw/cscRow/description.json @@ -3,10 +3,10 @@ "description": "", "flow": "hls", "name": "Xilinx CSC Matrix Row Accumulation", - "part_blacklist": [], - "part_whitelist": [], - "platform_blacklist": [], - "platform_whitelist": [ + "part_blocklist": [], + "part_allowlist": [], + "platform_blocklist": [], + "platform_allowlist": [ "u280", "aws-vu9p-f1", "vck190" @@ -35,17 +35,17 @@ "env": "", "index": 0, "max_memory_MB": { - "hls_vivado_syn": 16384, + "vivado_syn": 16384, "hls_csim": 10240, "hls_cosim": 16384, - "hls_vivado_impl": 16384, + "vivado_impl": 16384, "hls_csynth": 10240 }, "max_time_min": { - "hls_vivado_syn": 300, + "vivado_syn": 300, "hls_csim": 60, "hls_cosim": 300, - "hls_vivado_impl": 300, + "vivado_impl": 300, "hls_csynth": 60 } } diff --git a/sparse/L1/tests/hw/dispCol/description.json b/sparse/L1/tests/hw/dispCol/description.json index 075e545a72..84ede2dece 100644 --- a/sparse/L1/tests/hw/dispCol/description.json +++ b/sparse/L1/tests/hw/dispCol/description.json @@ -3,10 +3,10 @@ "description": "", "flow": "hls", "name": "Xilinx Column Vector Dispatching", - "part_blacklist": [], - "part_whitelist": [], - "platform_blacklist": [], - "platform_whitelist": [ + "part_blocklist": [], + "part_allowlist": [], + "platform_blocklist": [], + "platform_allowlist": [ "u280", "aws-vu9p-f1", "vck190" @@ -35,17 +35,17 @@ "env": "", "index": 0, "max_memory_MB": { - "hls_vivado_syn": 16384, + "vivado_syn": 16384, "hls_csim": 10240, "hls_cosim": 16384, - "hls_vivado_impl": 16384, + "vivado_impl": 16384, "hls_csynth": 10240 }, "max_time_min": { - "hls_vivado_syn": 300, + "vivado_syn": 300, "hls_csim": 60, "hls_cosim": 300, - "hls_vivado_impl": 300, + "vivado_impl": 300, "hls_csynth": 60 } } diff --git a/sparse/L1/tests/hw/dispColVec/description.json b/sparse/L1/tests/hw/dispColVec/description.json index 6eb67cc9b8..497e95f5f6 100644 --- a/sparse/L1/tests/hw/dispColVec/description.json +++ b/sparse/L1/tests/hw/dispColVec/description.json @@ -3,10 +3,10 @@ "description": "", "flow": "hls", "name": "Xilinx Column Vector Block Dispatching", - "part_blacklist": [], - "part_whitelist": [], - "platform_blacklist": [], - "platform_whitelist": [ + "part_blocklist": [], + "part_allowlist": [], + "platform_blocklist": [], + "platform_allowlist": [ "u280", "aws-vu9p-f1", "vck190" @@ -35,17 +35,17 @@ "env": "", "index": 0, "max_memory_MB": { - "hls_vivado_syn": 16384, + "vivado_syn": 16384, "hls_csim": 10240, "hls_cosim": 16384, - "hls_vivado_impl": 16384, + "vivado_impl": 16384, "hls_csynth": 10240 }, "max_time_min": { - "hls_vivado_syn": 300, + "vivado_syn": 300, "hls_csim": 60, "hls_cosim": 300, - "hls_vivado_impl": 300, + "vivado_impl": 300, "hls_csynth": 60 } } diff --git a/sparse/L1/tests/hw/dispNnzCol/description.json b/sparse/L1/tests/hw/dispNnzCol/description.json index 2fb2dec9a9..1f2c6766a2 100644 --- a/sparse/L1/tests/hw/dispNnzCol/description.json +++ b/sparse/L1/tests/hw/dispNnzCol/description.json @@ -3,10 +3,10 @@ "description": "", "flow": "hls", "name": "Xilinx Column Pointer Dispatching", - "part_blacklist": [], - "part_whitelist": [], - "platform_blacklist": [], - "platform_whitelist": [ + "part_blocklist": [], + "part_allowlist": [], + "platform_blocklist": [], + "platform_allowlist": [ "u280", "aws-vu9p-f1", "vck190" @@ -35,17 +35,17 @@ "env": "", "index": 0, "max_memory_MB": { - "hls_vivado_syn": 16384, + "vivado_syn": 16384, "hls_csim": 10240, "hls_cosim": 16384, - "hls_vivado_impl": 16384, + "vivado_impl": 16384, "hls_csynth": 10240 }, "max_time_min": { - "hls_vivado_syn": 300, + "vivado_syn": 300, "hls_csim": 60, "hls_cosim": 300, - "hls_vivado_impl": 300, + "vivado_impl": 300, "hls_csynth": 60 } } diff --git a/sparse/L1/tests/hw/rowAcc/description.json b/sparse/L1/tests/hw/rowAcc/description.json index c9321f9d11..60961b4609 100644 --- a/sparse/L1/tests/hw/rowAcc/description.json +++ b/sparse/L1/tests/hw/rowAcc/description.json @@ -3,10 +3,10 @@ "description": "", "flow": "hls", "name": "Xilinx Matrix Row Accumulator", - "part_blacklist": [], - "part_whitelist": [], - "platform_blacklist": [], - "platform_whitelist": [ + "part_blocklist": [], + "part_allowlist": [], + "platform_blocklist": [], + "platform_allowlist": [ "u280", "aws-vu9p-f1", "vck190" @@ -35,17 +35,17 @@ "env": "", "index": 0, "max_memory_MB": { - "hls_vivado_syn": 16384, + "vivado_syn": 16384, "hls_csim": 10240, "hls_cosim": 16384, - "hls_vivado_impl": 16384, + "vivado_impl": 16384, "hls_csynth": 10240 }, "max_time_min": { - "hls_vivado_syn": 300, + "vivado_syn": 300, "hls_csim": 60, "hls_cosim": 300, - "hls_vivado_impl": 300, + "vivado_impl": 300, "hls_csynth": 60 } } diff --git a/sparse/L1/tests/hw/rowAgg/description.json b/sparse/L1/tests/hw/rowAgg/description.json index 6f8f98e3a2..af84c8e748 100644 --- a/sparse/L1/tests/hw/rowAgg/description.json +++ b/sparse/L1/tests/hw/rowAgg/description.json @@ -3,10 +3,10 @@ "description": "", "flow": "hls", "name": "Xilinx Matrix Row Memory Accumulator", - "part_blacklist": [], - "part_whitelist": [], - "platform_blacklist": [], - "platform_whitelist": [ + "part_blocklist": [], + "part_allowlist": [], + "platform_blocklist": [], + "platform_allowlist": [ "u280", "aws-vu9p-f1", "vck190" @@ -35,17 +35,17 @@ "env": "", "index": 0, "max_memory_MB": { - "hls_vivado_syn": 16384, + "vivado_syn": 16384, "hls_csim": 10240, "hls_cosim": 16384, - "hls_vivado_impl": 16384, + "vivado_impl": 16384, "hls_csynth": 10240 }, "max_time_min": { - "hls_vivado_syn": 300, + "vivado_syn": 300, "hls_csim": 60, "hls_cosim": 300, - "hls_vivado_impl": 300, + "vivado_impl": 300, "hls_csynth": 60 } } diff --git a/sparse/L1/tests/hw/xBarCol/description.json b/sparse/L1/tests/hw/xBarCol/description.json index b8f897f60e..9f18ceda3e 100644 --- a/sparse/L1/tests/hw/xBarCol/description.json +++ b/sparse/L1/tests/hw/xBarCol/description.json @@ -3,10 +3,10 @@ "description": "", "flow": "hls", "name": "Xilinx Column Crossbar", - "part_blacklist": [], - "part_whitelist": [], - "platform_blacklist": [], - "platform_whitelist": [ + "part_blocklist": [], + "part_allowlist": [], + "platform_blocklist": [], + "platform_allowlist": [ "u280", "aws-vu9p-f1", "vck190" @@ -35,17 +35,17 @@ "env": "", "index": 0, "max_memory_MB": { - "hls_vivado_syn": 16384, + "vivado_syn": 16384, "hls_csim": 10240, "hls_cosim": 16384, - "hls_vivado_impl": 16384, + "vivado_impl": 16384, "hls_csynth": 10240 }, "max_time_min": { - "hls_vivado_syn": 300, + "vivado_syn": 300, "hls_csim": 60, "hls_cosim": 300, - "hls_vivado_impl": 300, + "vivado_impl": 300, "hls_csynth": 60 } } diff --git a/sparse/L1/tests/hw/xBarRow/description.json b/sparse/L1/tests/hw/xBarRow/description.json index 5a349d256f..073efc4943 100644 --- a/sparse/L1/tests/hw/xBarRow/description.json +++ b/sparse/L1/tests/hw/xBarRow/description.json @@ -3,10 +3,10 @@ "description": "", "flow": "hls", "name": "Xilinx Row Crossbar", - "part_blacklist": [], - "part_whitelist": [], - "platform_blacklist": [], - "platform_whitelist": [ + "part_blocklist": [], + "part_allowlist": [], + "platform_blocklist": [], + "platform_allowlist": [ "u280", "aws-vu9p-f1", "vck190" @@ -35,17 +35,17 @@ "env": "", "index": 0, "max_memory_MB": { - "hls_vivado_syn": 16384, + "vivado_syn": 16384, "hls_csim": 10240, "hls_cosim": 16384, - "hls_vivado_impl": 16384, + "vivado_impl": 16384, "hls_csynth": 10240 }, "max_time_min": { - "hls_vivado_syn": 300, + "vivado_syn": 300, "hls_csim": 60, "hls_cosim": 300, - "hls_vivado_impl": 300, + "vivado_impl": 300, "hls_csynth": 60 } } diff --git a/sparse/L2/benchmarks/spmv_double/description.json b/sparse/L2/benchmarks/spmv_double/description.json index e58d2d66ed..b92ff5204b 100644 --- a/sparse/L2/benchmarks/spmv_double/description.json +++ b/sparse/L2/benchmarks/spmv_double/description.json @@ -4,10 +4,10 @@ "description": "Xilinx SPARSE Test", "flow": "vitis", "platform_type": "pcie", - "platform_whitelist": [ + "platform_allowlist": [ "u280" ], - "platform_blacklist": [ + "platform_blocklist": [ "other" ], "platform_properties": { diff --git a/sparse/L2/tests/cscmv/Makefile b/sparse/L2/tests/cscmv/Makefile index 89ed171708..4e7b601e70 100644 --- a/sparse/L2/tests/cscmv/Makefile +++ b/sparse/L2/tests/cscmv/Makefile @@ -108,6 +108,7 @@ CXXFLAGS += -I$(XILINX_XRT)/include -I$(XILINX_HLS)/include -std=c++11 -O3 -Wall LDFLAGS += -L$(XILINX_XRT)/lib -lOpenCL -lpthread -lrt -Wno-unused-label -Wno-narrowing -DVERBOSE CXXFLAGS += -fmessage-length=0 -O0 CXXFLAGS += -I$(CUR_DIR)/src/ +CXXFLAGS += $(EXTRA_CXXFLAGS) ifeq ($(HOST_ARCH), x86) LDFLAGS += -L$(XILINX_HLS)/lnx64/tools/fpo_v7_0 -Wl,--as-needed -lgmp -lmpfr -lIp_floating_point_v7_0_bitacc_cmodel @@ -120,7 +121,7 @@ EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) HOST_ARGS := $(BUILD_DIR)/cscmv.xclbin $(CUR_DIR)/data/app.bin # ##################### Kernel compiler global settings ########################## -VPP_FLAGS += -t $(TARGET) --platform $(XPLATFORM) --save-temps --optimize 2 +VPP_FLAGS += -t $(TARGET) --platform $(XPLATFORM) --save-temps --optimize 2 -R 2 VPP_FLAGS += --jobs 8 ifneq (,$(shell echo $(XPLATFORM) | awk '/u280/')) VPP_FLAGS += --config $(CUR_DIR)/compile_opts.cfg @@ -134,6 +135,7 @@ VPP_FLAGS += -I$(XFLIB_DIR)/L2/include/hw VPP_FLAGS += -I$(XFLIB_DIR)/L1/include/hw VPP_FLAGS += -I$(XFLIB_DIR)/L2/include/hw/fp32 VPP_FLAGS += -I$(XFLIB_DIR)/../blas/L1/include/hw +VPP_FLAGS += $(EXTRA_VPP_FLAGS) ifneq (,$(shell echo $(XPLATFORM) | awk '/u280/')) VPP_LDFLAGS_cscmv += --kernel_frequency 250 diff --git a/sparse/L2/tests/cscmv/description.json b/sparse/L2/tests/cscmv/description.json index dc307a93b1..90a63c0ddd 100644 --- a/sparse/L2/tests/cscmv/description.json +++ b/sparse/L2/tests/cscmv/description.json @@ -4,10 +4,10 @@ "description": "", "flow": "vitis", "platform_type": "pcie", - "platform_whitelist": [ + "platform_allowlist": [ "u280" ], - "platform_blacklist": [ + "platform_blocklist": [ "vck190", "other" ], @@ -15,7 +15,7 @@ "u280": { "v++": { "compiler": { - "cflags": [ + "clflags": [ "--config PROJECT/compile_opts.cfg" ] } @@ -163,7 +163,7 @@ }, "max_time_min": { "vitis_hw_build": 2350, - "vitis_hw_emu": 470, + "vitis_hw_emu": 1200, "vitis_hw_run": 10 } } diff --git a/sparse/L2/tests/cscmv/preSysLink.tcl b/sparse/L2/tests/cscmv/preSysLink.tcl new file mode 100644 index 0000000000..664d9964c1 --- /dev/null +++ b/sparse/L2/tests/cscmv/preSysLink.tcl @@ -0,0 +1 @@ +upgrade_ip [get_bd_cells -filter {VLNV=~*hbm_memory_subsystem*}] diff --git a/sparse/L2/tests/cscmv/utils.mk b/sparse/L2/tests/cscmv/utils.mk index 2e98106af4..11cd61f1bb 100644 --- a/sparse/L2/tests/cscmv/utils.mk +++ b/sparse/L2/tests/cscmv/utils.mk @@ -73,18 +73,25 @@ endif #Checks for g++ CXX := g++ +VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) ifeq ($(HOST_ARCH), x86) -ifneq ($(shell expr $(shell g++ -dumpversion) \>= 5), 1) +ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) +CXX_VER := 8.3.0 +else +CXX_VER := 6.2.0 +endif +CXX_V := $(shell echo $(CXX_VER) | awk -F. '{print tolower($$1)}') +ifneq ($(shell expr $(shell echo "__GNUG__" | g++ -E -x c++ - | tail -1) \>= $(CXX_V)), 1) ifndef XILINX_VIVADO -$(error [ERROR]: g++ version older. Please use 5.0 or above) +$(error [ERROR]: g++ version too old. Please use $(CXX_VER) or above) else -CXX := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/bin/g++ +CXX := $(XILINX_VIVADO)/tps/lnx64/gcc-$(CXX_VER)/bin/g++ ifeq ($(LD_LIBRARY_PATH),) -export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/lib64 +export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-$(CXX_VER)/lib64 else -export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/lib64:$(LD_LIBRARY_PATH) +export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-$(CXX_VER)/lib64:$(LD_LIBRARY_PATH) endif -$(warning [WARNING]: g++ version older. Using g++ provided by the tool : $(CXX)) +$(warning [WARNING]: g++ version too old. Using g++ provided by the tool: $(CXX)) endif endif else ifeq ($(HOST_ARCH), aarch64) @@ -199,3 +206,9 @@ RMDIR = rm -rf MV = mv -f CP = cp -rf ECHO:= @echo + +ifneq (,$(shell echo $(XPLATFORM) | awk '/xilinx_u280_xdma_201920_3/')) +ifeq ($(TARGET), hw) +VPP_LDFLAGS += --advanced.param compiler.userPreSysLinkOverlayTcl=preSysLink.tcl +endif +endif diff --git a/sparse/L2/tests/cscmvSingleHbm/Makefile b/sparse/L2/tests/cscmvSingleHbm/Makefile index db96440e8e..9d7557c561 100644 --- a/sparse/L2/tests/cscmvSingleHbm/Makefile +++ b/sparse/L2/tests/cscmvSingleHbm/Makefile @@ -108,6 +108,7 @@ CXXFLAGS += -I$(XILINX_XRT)/include -I$(XILINX_HLS)/include -std=c++11 -O3 -Wall LDFLAGS += -L$(XILINX_XRT)/lib -lOpenCL -lpthread -lrt -Wno-unused-label -Wno-narrowing -DVERBOSE CXXFLAGS += -fmessage-length=0 -O3 -Wall -Wno-unknown-pragmas -Wno-unused-label -pthread CXXFLAGS += -I$(CUR_DIR)/src/ +CXXFLAGS += $(EXTRA_CXXFLAGS) ifeq ($(HOST_ARCH), x86) LDFLAGS += -L$(XILINX_HLS)/lnx64/tools/fpo_v7_0 -Wl,--as-needed -lgmp -lmpfr -lIp_floating_point_v7_0_bitacc_cmodel @@ -120,7 +121,7 @@ EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) HOST_ARGS := $(BUILD_DIR)/cscmv.xclbin $(CUR_DIR)/data/app.bin # ##################### Kernel compiler global settings ########################## -VPP_FLAGS += -t $(TARGET) --platform $(XPLATFORM) --save-temps --optimize 2 +VPP_FLAGS += -t $(TARGET) --platform $(XPLATFORM) --save-temps --optimize 2 -R 2 VPP_FLAGS += --jobs 8 VPP_FLAGS += -I$(XFLIB_DIR)/L1/include/hw VPP_FLAGS += -I$(XFLIB_DIR)/L1/include/sw @@ -134,6 +135,7 @@ VPP_FLAGS += -I$(XFLIB_DIR)/../blas/L1/include/hw cscmvSeqKernel_VPP_FLAGS += --config $(CUR_DIR)/compile_opts_seq.cfg cscmvSeqKernel_VPP_FLAGS += --hls.clock 300000000:cscmvSeqKernel VPP_LDFLAGS_cscmv += --kernel_frequency 300 +VPP_FLAGS += $(EXTRA_VPP_FLAGS) VPP_FLAGS += -DSPARSE_maxParamDdrBlocks=1024 -DSPARSE_maxParamHbmBlocks=512 -DSPARSE_paramOffset=1024 -DSPARSE_maxColMemBlocks=128 -DSPARSE_maxColParBlocks=512 -DSPARSE_maxRowBlocks=512 -DSPARSE_dataType=float -DSPARSE_indexType=uint32_t -DSPARSE_logParEntries=2 -DSPARSE_parEntries=4 -DSPARSE_logParGroups=0 -DSPARSE_parGroups=1 -DSPARSE_dataBits=32 -DSPARSE_indexBits=32 -DSPARSE_hbmMemBits=256 -DSPARSE_ddrMemBits=512 -DSPARSE_hbmChannels=1 -DSPARSE_hbmChannelMegaBytes=256 -DSPARSE_printWidth=6 -DSPARSE_pageSize=4096 -DDEBUG_dumpData=0 -DSEQ_KERNEL=0 diff --git a/sparse/L2/tests/cscmvSingleHbm/description.json b/sparse/L2/tests/cscmvSingleHbm/description.json index fd9b421f9b..f7f40a0296 100644 --- a/sparse/L2/tests/cscmvSingleHbm/description.json +++ b/sparse/L2/tests/cscmvSingleHbm/description.json @@ -1,14 +1,13 @@ { "gui": true, - "exclude": "README.md", "name": "Xilinx CSCMV Sequential Run", - "description": "", + "description": "Test case for sparse matrix-vector multiplication which is stored in Compressed Sparse Column Format(CSC)", "flow": "vitis", "platform_type": "pcie", - "platform_whitelist": [ + "platform_allowlist": [ "u280" ], - "platform_blacklist": [ + "platform_blocklist": [ "vck190", "other" ], @@ -27,7 +26,7 @@ "launch": [ { "name": "generic launch for all flows", - "cmd_args": " BUILD/cscmv.xclbin BUILD/data/app.bin" + "cmd_args": " BUILD/cscmv.xclbin PROJECT/data/app.bin" } ], "pre_launch": [ diff --git a/sparse/L2/tests/cscmvSingleHbm/preSysLink.tcl b/sparse/L2/tests/cscmvSingleHbm/preSysLink.tcl new file mode 100644 index 0000000000..664d9964c1 --- /dev/null +++ b/sparse/L2/tests/cscmvSingleHbm/preSysLink.tcl @@ -0,0 +1 @@ +upgrade_ip [get_bd_cells -filter {VLNV=~*hbm_memory_subsystem*}] diff --git a/sparse/L2/tests/cscmvSingleHbm/utils.mk b/sparse/L2/tests/cscmvSingleHbm/utils.mk index 2e98106af4..4e5b0ac358 100644 --- a/sparse/L2/tests/cscmvSingleHbm/utils.mk +++ b/sparse/L2/tests/cscmvSingleHbm/utils.mk @@ -73,18 +73,25 @@ endif #Checks for g++ CXX := g++ +VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) ifeq ($(HOST_ARCH), x86) -ifneq ($(shell expr $(shell g++ -dumpversion) \>= 5), 1) +ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) +CXX_VER := 8.3.0 +else +CXX_VER := 6.2.0 +endif +CXX_V := $(shell echo $(CXX_VER) | awk -F. '{print tolower($$1)}') +ifneq ($(shell expr $(shell echo "__GNUG__" | g++ -E -x c++ - | tail -1) \>= $(CXX_V)), 1) ifndef XILINX_VIVADO -$(error [ERROR]: g++ version older. Please use 5.0 or above) +$(error [ERROR]: g++ version too old. Please use $(CXX_VER) or above) else -CXX := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/bin/g++ +CXX := $(XILINX_VIVADO)/tps/lnx64/gcc-$(CXX_VER)/bin/g++ ifeq ($(LD_LIBRARY_PATH),) -export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/lib64 +export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-$(CXX_VER)/lib64 else -export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/lib64:$(LD_LIBRARY_PATH) +export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-$(CXX_VER)/lib64:$(LD_LIBRARY_PATH) endif -$(warning [WARNING]: g++ version older. Using g++ provided by the tool : $(CXX)) +$(warning [WARNING]: g++ version too old. Using g++ provided by the tool: $(CXX)) endif endif else ifeq ($(HOST_ARCH), aarch64) @@ -199,3 +206,8 @@ RMDIR = rm -rf MV = mv -f CP = cp -rf ECHO:= @echo +ifneq (,$(shell echo $(XPLATFORM) | awk '/xilinx_u280_xdma_201920_3/')) +ifeq ($(TARGET), hw) +VPP_LDFLAGS += --advanced.param compiler.userPreSysLinkOverlayTcl=preSysLink.tcl +endif +endif diff --git a/sparse/L2/tests/fp64/spmv/Makefile b/sparse/L2/tests/fp64/spmv/Makefile index 818cbd4f3a..a60730cac5 100644 --- a/sparse/L2/tests/fp64/spmv/Makefile +++ b/sparse/L2/tests/fp64/spmv/Makefile @@ -111,6 +111,7 @@ CXXFLAGS += -I$(XILINX_XRT)/include -I$(XILINX_HLS)/include -std=c++11 -O3 -Wall LDFLAGS += -L$(XILINX_XRT)/lib -lOpenCL -lpthread -lrt -Wno-unused-label -Wno-narrowing -DVERBOSE CXXFLAGS += -fmessage-length=0 -g -O0 CXXFLAGS += -I$(CUR_DIR)/src/ +CXXFLAGS += $(EXTRA_CXXFLAGS) ifeq ($(HOST_ARCH), x86) LDFLAGS += -L$(XILINX_HLS)/lnx64/tools/fpo_v7_0 -Wl,--as-needed -lgmp -lmpfr -lIp_floating_point_v7_0_bitacc_cmodel @@ -123,7 +124,7 @@ EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) HOST_ARGS := $(BUILD_DIR)/spmv.xclbin $(CUR_DIR)/sig_dat $(CUR_DIR)/vec_dat nasa2910 # ##################### Kernel compiler global settings ########################## -VPP_FLAGS += -t $(TARGET) --platform $(XPLATFORM) --save-temps --optimize 2 +VPP_FLAGS += -t $(TARGET) --platform $(XPLATFORM) --save-temps --optimize 2 -R 2 VPP_FLAGS += --jobs 8 VPP_FLAGS += -I$(XFLIB_DIR)/L1/include/hw VPP_FLAGS += -I$(XFLIB_DIR)/L1/include/sw @@ -147,6 +148,7 @@ storeYkernel_VPP_FLAGS += --hls.clock 333000000:storeYkernel VPP_LDFLAGS_spmv += --kernel_frequency 333 VPP_FLAGS += -DSPARSE_dataType=double -DSPARSE_indexType=uint16_t -DSPARSE_parEntries=4 -DSPARSE_hbmChannels=16 -DSPARSE_hbmMemBits=256 -DSPARSE_maxRows=4096 -DSPARSE_maxCols=4096 -DSPARSE_accLatency=8 -DSPARSE_dataBits=64 -DSPARSE_indexBits=16 +VPP_FLAGS += $(EXTRA_VPP_FLAGS) # Kernel linker flags VPP_LDFLAGS_spmv_temp := --config $(CUR_DIR)/opts.cfg diff --git a/sparse/L2/tests/fp64/spmv/description.json b/sparse/L2/tests/fp64/spmv/description.json index bd7e66d76b..9ac9a6ca33 100644 --- a/sparse/L2/tests/fp64/spmv/description.json +++ b/sparse/L2/tests/fp64/spmv/description.json @@ -4,10 +4,10 @@ "description": "Xilinx SPARSE Test", "flow": "vitis", "platform_type": "pcie", - "platform_whitelist": [ + "platform_allowlist": [ "u280" ], - "platform_blacklist": [ + "platform_blocklist": [ "vck190", "other" ], @@ -138,7 +138,11 @@ "vitis_hw_emu": 28672, "vitis_hw_run": 10240 }, - "max_time_min": 520 + "max_time_min": { + "vitis_hw_build": 720, + "vitis_hw_emu": 1200, + "vitis_hw_run": 720 + } } ], "targets": [ diff --git a/sparse/L2/tests/fp64/spmv/preSysLink.tcl b/sparse/L2/tests/fp64/spmv/preSysLink.tcl new file mode 100644 index 0000000000..664d9964c1 --- /dev/null +++ b/sparse/L2/tests/fp64/spmv/preSysLink.tcl @@ -0,0 +1 @@ +upgrade_ip [get_bd_cells -filter {VLNV=~*hbm_memory_subsystem*}] diff --git a/sparse/L2/tests/fp64/spmv/utils.mk b/sparse/L2/tests/fp64/spmv/utils.mk index 2e98106af4..4e5b0ac358 100644 --- a/sparse/L2/tests/fp64/spmv/utils.mk +++ b/sparse/L2/tests/fp64/spmv/utils.mk @@ -73,18 +73,25 @@ endif #Checks for g++ CXX := g++ +VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) ifeq ($(HOST_ARCH), x86) -ifneq ($(shell expr $(shell g++ -dumpversion) \>= 5), 1) +ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) +CXX_VER := 8.3.0 +else +CXX_VER := 6.2.0 +endif +CXX_V := $(shell echo $(CXX_VER) | awk -F. '{print tolower($$1)}') +ifneq ($(shell expr $(shell echo "__GNUG__" | g++ -E -x c++ - | tail -1) \>= $(CXX_V)), 1) ifndef XILINX_VIVADO -$(error [ERROR]: g++ version older. Please use 5.0 or above) +$(error [ERROR]: g++ version too old. Please use $(CXX_VER) or above) else -CXX := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/bin/g++ +CXX := $(XILINX_VIVADO)/tps/lnx64/gcc-$(CXX_VER)/bin/g++ ifeq ($(LD_LIBRARY_PATH),) -export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/lib64 +export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-$(CXX_VER)/lib64 else -export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/lib64:$(LD_LIBRARY_PATH) +export LD_LIBRARY_PATH := $(XILINX_VIVADO)/tps/lnx64/gcc-$(CXX_VER)/lib64:$(LD_LIBRARY_PATH) endif -$(warning [WARNING]: g++ version older. Using g++ provided by the tool : $(CXX)) +$(warning [WARNING]: g++ version too old. Using g++ provided by the tool: $(CXX)) endif endif else ifeq ($(HOST_ARCH), aarch64) @@ -199,3 +206,8 @@ RMDIR = rm -rf MV = mv -f CP = cp -rf ECHO:= @echo +ifneq (,$(shell echo $(XPLATFORM) | awk '/xilinx_u280_xdma_201920_3/')) +ifeq ($(TARGET), hw) +VPP_LDFLAGS += --advanced.param compiler.userPreSysLinkOverlayTcl=preSysLink.tcl +endif +endif