Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
Expand All @@ -18,7 +18,10 @@ set(TACO_FEATURE_OPENMP 0)
set(TACO_FEATURE_PYTHON 0)
if(CUDA)
message("-- Searching for CUDA Installation")
find_package(CUDA REQUIRED)
find_package(CUDAToolkit QUIET)
if(NOT CUDAToolkit_FOUND)
find_package(CUDA REQUIRED)
endif()
add_definitions(-DCUDA_BUILT)
set(TACO_FEATURE_CUDA 1)
endif(CUDA)
Expand Down
2 changes: 1 addition & 1 deletion apps/tensor_times_vector/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.10)
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
Expand Down
8 changes: 6 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ add_definitions(${TACO_DEFINITIONS})
include_directories(${TACO_SRC_DIR})
add_library(taco ${TACO_LIBRARY_TYPE} ${TACO_HEADERS} ${TACO_SOURCES})
if (CUDA)
include_directories(${CUDA_INCLUDE_DIRS})
target_link_libraries(taco PUBLIC ${CUDA_LIBRARIES})
if(TARGET CUDA::cudart)
target_link_libraries(taco PUBLIC CUDA::cudart)
else()
include_directories(${CUDA_INCLUDE_DIRS})
target_link_libraries(taco PUBLIC ${CUDA_LIBRARIES})
endif()
endif (CUDA)
install(TARGETS taco DESTINATION lib)

Expand Down
2 changes: 0 additions & 2 deletions src/lower/lowerer_impl_imperative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ Stmt LowererImplImperative::lowerAssignment(Assignment assignment)
if (isAssembledByUngroupedInsertion(result)) {
std::vector<Expr> coords;
Expr prevPos = 0;
size_t i = 0;
const auto resultIterators = getIterators(assignment.getLhs());
for (const auto& it : resultIterators) {
// TODO: Should only assemble levels that can be assembled together
Expand All @@ -517,7 +516,6 @@ Stmt LowererImplImperative::lowerAssignment(Assignment assignment)
}

prevPos = pos;
++i;
}
}

Expand Down
7 changes: 0 additions & 7 deletions test/tests-scheduling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,6 @@ TEST(scheduling, multilevel_tiling) {

vector<IndexVar> reordering = {iX1, iX2, iY1, iY2};
sort(reordering.begin(), reordering.end());
int countCorrect = 0;
int countIncorrect = 0;
do {
// TODO: Precondition (can be broken) bottom most loop must remain unchanged if sparse
bool valid_reordering = reordering[3] == iY2;
Expand All @@ -583,17 +581,12 @@ TEST(scheduling, multilevel_tiling) {
C.compute();
if (!equals(C, expected)) {
//cout << util::join(reordering) << endl;
countIncorrect++;

std::shared_ptr<ir::CodeGen> codegen = ir::CodeGen::init_default(cout, ir::CodeGen::ImplementationGen);
ir::Stmt compute = lower(reordered, "compute", false, true);
codegen->compile(compute, true);
ASSERT_TENSOR_EQ(expected, C);
exit(1);
}
else {
countCorrect++;
}
} while (next_permutation(reordering.begin(), reordering.end()));
}

Expand Down
2 changes: 1 addition & 1 deletion test/tests-tensor_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TYPED_TEST_P(VectorTensorTest, types) {
ASSERT_EQ(t, a.getComponentType());
ASSERT_EQ(1, a.getOrder());
ASSERT_EQ(5, a.getDimension(0));
map<vector<int>,TypeParam> vals = {{{0}, 1.0}, {{2}, 2.0}};
map<vector<int>,TypeParam> vals = {{{0}, static_cast<TypeParam>(1)}, {{2}, static_cast<TypeParam>(2)}};
for (auto& val : vals) {
a.insert(val.first, val.second);
}
Expand Down