Skip to content

Commit

Permalink
Merge pull request #555 from ndellingwood/sptrsv-pr-2
Browse files Browse the repository at this point in the history
sptrsv: Add tplchain and cusparse
  • Loading branch information
ndellingwood authored Dec 20, 2019
2 parents d29beba + bfac0c0 commit 6684d19
Show file tree
Hide file tree
Showing 15 changed files with 3,402 additions and 353 deletions.
6 changes: 3 additions & 3 deletions example/buildlib/compileKokkosKernelsSimple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ KOKKOSKERNELS_LAYOUTS=LayoutLeft #the layout types to instantiate.
KOKKOSKERNELS_ORDINALS=int #ordinal types to instantiate
KOKKOSKERNELS_OFFSETS=int #offset types to instantiate
KOKKOSKERNELS_PATH=../.. #path to kokkos-kernels top directory.
CXX=icpc #${KOKKOS_PATH}/config/nvcc_wrapper #icpc #
CXX=${KOKKOS_PATH}/bin/nvcc_wrapper #icpc #
KOKKOSKERNELS_OPTIONS=eti-only #options for kokkoskernels
KOKKOS_DEVICES=OpenMP # other devices Cuda,Serial ..
KOKKOS_ARCHS=KNL
KOKKOS_DEVICES=Cuda # other devices Cuda,Serial ..
KOKKOS_ARCHS=SKX,Volta70
CXXFLAGS="-Wall -pedantic -Werror -O3 -g -Wshadow -Wsign-compare -Wtype-limits -Wuninitialized"

../../scripts/generate_makefile.bash --kokkoskernels-path=${KOKKOSKERNELS_PATH} --with-scalars=${KOKKOSKERNELS_SCALARS} --with-ordinals=${KOKKOSKERNELS_ORDINALS} --with-offsets=${KOKKOSKERNELS_OFFSETS} --kokkos-path=${KOKKOS_PATH} --with-devices=${KOKKOS_DEVICES} --arch=${KOKKOS_ARCHS} --compiler=${CXX} --with-options=${KOKKOSKERNELS_OPTIONS} --cxxflags="${CXXFLAGS}"
2 changes: 1 addition & 1 deletion perf_test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ default: $(TEST_TARGETS)
build: $(TEST_TARGETS)

%.exe:%.o $(KOKKOS_LINK_DEPENDS) $(KOKKOSKERNELS_LINK_DEPENDS) $(TEST_HEADERS)
$(LINK) $(EXTRA_PATH) $< $(KOKKOSKERNELS_LDFLAGS) $(KOKKOSKERNELS_LIBS) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o $@
$(LINK) $(EXTRA_PATH) $< $(KOKKOSKERNELS_LDFLAGS) $(KOKKOSKERNELS_LIBS) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(LDLIB) -o $@

%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(KOKKOSKERNELS_CPP_DEPENDS) $(TEST_HEADERS)
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOSKERNELS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(INC) $(CXXFLAGS) $(EXTRA_INC) -I. -c $< -o $(notdir $@)
Expand Down
6 changes: 3 additions & 3 deletions perf_test/sparse/KokkosSparse_spiluk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ using namespace KokkosKernels::Experimental;
enum {DEFAULT, CUSPARSE, LVLSCHED_RP, LVLSCHED_TP1/*, LVLSCHED_TP2*/};

template<typename Scalar>
int test_spiluk_perf(std::vector<int> tests, std::string afilename, int k, int team_size, int vector_length, /*int idx_offset,*/ int loop) {
int test_spiluk_perf(std::vector<int> tests, std::string afilename, int K, int team_size, int vector_length, /*int idx_offset,*/ int loop) {

typedef Scalar scalar_t;
typedef default_lno_t lno_t;
Expand Down Expand Up @@ -119,12 +119,12 @@ int test_spiluk_perf(std::vector<int> tests, std::string afilename, int k, int t

std::cout << "\n\n" << std::endl;
if (!afilename.empty()) {
std::cout << "ILU(k) Begin: Read matrix filename " << afilename << std::endl;
std::cout << "ILU(K) Begin: Read matrix filename " << afilename << std::endl;
crsmat_t A = KokkosKernels::Impl::read_kokkos_crst_matrix<crsmat_t>(afilename.c_str()); //in_matrix
graph_t graph = A.graph; // in_graph
const size_type nrows = graph.numRows();
const int nnz = A.nnz();
const typename KernelHandle::const_nnz_lno_t fill_lev = lno_t(k) ;
const typename KernelHandle::const_nnz_lno_t fill_lev = lno_t(K) ;

#ifdef KOKKOSKERNELS_ENABLE_TPL_CUSPARSE
//cuSPARSE requires lno_t = size_type = int. For both, int is always used (if enabled)
Expand Down
Loading

0 comments on commit 6684d19

Please sign in to comment.