Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

[WIP] use templated isl types #533

Open
wants to merge 102 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
e0e7f5f
fix return type of operator+(int i, T A)
Jul 27, 2018
b4ee22e
generalize operator+(T A, int i) to template form
Jul 27, 2018
017f6b2
generalize operator-(T A, int i) to template form
Jul 31, 2018
c6edb23
generalize operator-(int i, T A) to template form
Jul 31, 2018
4cd6b79
generalize operator/(S left, T right) to template form
Jul 30, 2018
940516d
bump isl for export of isl_aff_add_constant_val
Jul 26, 2018
dd5952a
operator+(isl::aff A, isl::val v): call isl::aff::add_constant
Aug 3, 2018
8775082
generalize operator+(T A, isl::val v) to template form
Aug 3, 2018
7789b79
generalize operator*(T A, isl::val v) to template form
Aug 3, 2018
3be2511
MappedScop::insertMappingContext: drop redundant universe() call
Jul 26, 2018
ed82d3e
ScheduleTreeBand::drop: do not call domain() on a set space
Jul 27, 2018
a6adf84
memory_promotion.cc: referenceOriginalAccessesImpl: add missing param…
Aug 2, 2018
5900b06
Scop::makeScop: automatically deduce type of space variable
Jul 31, 2018
340abcf
halide2isl.cc: extractAccess: automatically deduce type of space vari…
Jun 21, 2018
3a8e622
promotionImprovesCoalescing: use get_map_list
Jul 27, 2018
5651b42
addSingletonReferenceGroups: use get_map_list
Jul 27, 2018
e313177
bump isl for export of isl_map_zip
Jul 26, 2018
dbe1c22
build generate_isl_cpp_h unconditionally
Aug 1, 2018
dddbdec
generate templated isl types
Jul 19, 2018
ddf9d55
inline extractDomainToIds
Jul 18, 2018
c56c67d
inline isSingleReductionWithin
Jul 25, 2018
608dc2e
inline ScheduleTreeBand::memberRange
Jul 25, 2018
a191681
inline partialScheduleMupa
Aug 1, 2018
fd8c91f
inline prefixScheduleMupa
Aug 1, 2018
8e51bef
inline infixScheduleMupa
Aug 1, 2018
6074215
inline prefixSchedule and partialSchedule
Aug 1, 2018
d4c18a9
inline extendSchedule
Aug 2, 2018
723df72
halide2isl.cc: extractAccess: explicitly cast space to isl::Space<>
Jun 21, 2018
9377e79
memory_promotion.cc: tensorElementsSet: explicitly cast space to isl:…
Jun 21, 2018
8183555
constructTensorTuple: use templated isl types
Jun 21, 2018
8a9e8f8
Scop::makeContext: explicitly cast space to isl::Space<>
Jun 21, 2018
f815eaa
makeSpecializationSet: use templated isl types
Jun 21, 2018
2351971
Scop::makeContext: use templated isl types
Jun 21, 2018
14359e4
Scop::context(): use templated isl types
Jun 21, 2018
9b532d6
codegen_llvm.cc: getTensorSize: use templated isl types
Jun 21, 2018
e5dad4f
memory_promotion.cc: tensorElementsSet: temporarily remove type deduc…
Jul 25, 2018
9186ed0
Scop::makeIslAffFromStmtExpr: temporarily remove type deduction
Jul 25, 2018
7a03987
core halide2isl: use templated isl types
Jun 21, 2018
5582763
halide2isl.cc: extractReduction: use templated isl types
Jun 21, 2018
bee3fae
Scop::context: remove explicit cast
Jun 21, 2018
d497486
Scop::domain(): use templated isl types
Jun 21, 2018
e8b4b23
memory_promotion.cc: tensorElementsSet: remove explicit cast
Jun 21, 2018
8bd2230
Scop::makeContext: remove explicit cast
Jun 21, 2018
1a53ca0
makeParameterContext: use templated isl types
Jun 21, 2018
7bea046
partialScheduleMupa: use templated isl types
Jun 21, 2018
1902ff1
prefixScheduleMupa: use templated isl types
Jun 21, 2018
91487b6
memberRange: use templated isl types
Jun 21, 2018
e847e76
reductionUpdates: use templated isl types
Jun 21, 2018
9ec451d
isSingleReductionWithin: use templated isl types
Jun 21, 2018
1c3f269
Body: use templated isl types
Jun 21, 2018
5c0c100
reductionMapSchedule: use templated isl types
Jun 21, 2018
cba1479
separatedOut: use templated isl types
Jun 21, 2018
9e51b37
constructThreadToWarp: use templated isl types
Jun 21, 2018
baf7371
prefixSchedule: use templated isl types
Jun 21, 2018
cedd941
labelExtension: use templated isl types
Jun 21, 2018
d48d635
labelFilterFromExtension: use templated isl types
Jun 21, 2018
fe17582
findCorePositions: use templated isl types
Jun 21, 2018
7772224
partialSchedule: use templated isl types
Jun 21, 2018
b567e98
ScheduleTree::makeMappingUnsafe: explicitly cast mapping
Aug 1, 2018
58a0b42
ScheduleTreeMapping::Mapping: use templated isl types
Jun 21, 2018
0585703
extractDomainToIds: use templated isl types
Jun 21, 2018
fe907e5
MappedScop::threadMappingSchedule: use templated isl types
Jun 21, 2018
3cb83a7
MappedScop::blockMappingSchedule: use templated isl types
Jun 21, 2018
93988fb
Scop::makeIslAffFromStmtExpr: use templated isl types
Jun 21, 2018
11a5573
activeDomainPoints: cast result to templated isl type
Jun 21, 2018
9a07caa
activeDomainPointsBelow: cast result to templated isl type
Jun 21, 2018
746e9ea
MappedScop::findBestSync: temporarily remove type deduction
Jun 21, 2018
18c298a
Scop::dependences: use templated isl types
Jun 21, 2018
77787cf
partialTargetTiles: use templated isl types
Jun 21, 2018
cd905a5
canOrder*: use templated isl types
Jun 21, 2018
00cdedf
order*: use templated isl types
Jun 21, 2018
7e088a8
collectMappingsTo: cast result to templated isl type
Jul 27, 2018
d0eb246
accessedWithin: use templated isl types
Jul 27, 2018
f9ebd3d
addSingletonReferenceGroups: use templated isl types
Jul 30, 2018
7571d68
addSingletonReferenceGroup: use templated isl types
Jul 30, 2018
a6fac0d
makeSingleton: use templated isl types
Jul 30, 2018
6ca1fa6
TensorReference: use templated isl types
Jul 30, 2018
b6fae4d
tensorElementsSet: use templated isl types
Jun 21, 2018
f021617
promotedFootprint: use templated isl types
Jul 30, 2018
ca62f45
TensorReferenceGroup::promotion: temporarily remove type deduction
Jul 30, 2018
28de59d
outputRanges: use templated isl types
Jul 30, 2018
5687150
removeRangeStrides: use templated isl types
Jul 30, 2018
1dfc84e
ScopedFootprint.box: use templated isl types
Jul 30, 2018
5b18188
TensorReferenceGroup::promotion: use templated isl types
Jul 31, 2018
08bc1a2
use templated isl types in schedule tree
Jun 21, 2018
125cdb5
MappedScop::map: use templated isl types
Aug 1, 2018
23a82a7
makeMapping: use templated isl types
Aug 1, 2018
f9ffa2b
infixScheduleMupa: use templated isl types
Jul 31, 2018
26d5f4a
MappedScop::findBestSync: use templated isl types
Jun 21, 2018
cae6a9a
Scop::domainRef: use templated isl types
Jun 21, 2018
589ba9e
promoteToRegistersBelow: use templated isl types
Jun 21, 2018
84d1363
partialScheduleMupa: use templated isl types
Jun 21, 2018
b296604
activeDomainPointsHelper: use templated isl types
Jun 21, 2018
8dc1271
accessSubscriptsAreUnrolledLoops: temporarily remove type deduction
Jun 21, 2018
b7f2fcc
TensorReferenceGroup::originalAccesses use templated isl types
Jun 21, 2018
fea7e37
makeNextElementMap: use templated isl types
Jul 27, 2018
78c61db
hasReuseWithin: use templated isl types
Jul 27, 2018
4b8db9f
isPromotableToRegistersBelow: use templated isl types
Jun 21, 2018
6440b03
accessSubscriptsAreUnrolledLoops: use templated isl types
Jun 21, 2018
229a698
collectMappingsTo: use templated isl types
Jul 27, 2018
d0e4d1b
TensorReferenceGroup::approximateScopedAccesses: use templated isl types
Aug 3, 2018
dbc7391
insertCopiesUnder: use templated isl types
Aug 2, 2018
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
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ message(STATUS "Found ATen.so file: ${ATEN_LIBRARIES}")
################################################################################
# use locally generated C++ bindings
include_directories(AFTER ${PROJECT_SOURCE_DIR}/isl_interface/include)
include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR}/isl_interface/include)
include_directories(AFTER ${PROJECT_SOURCE_DIR}/third-party/islpp/include)
include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR}/third-party/islpp/include)
add_subdirectory(external/isl)
Expand Down Expand Up @@ -334,6 +335,34 @@ else()
message(STATUS "Not building benchmarks, caffe2 or CUDA not available")
endif()

SET(ISL_CPP_H "${CMAKE_CURRENT_LIST_DIR}/isl_interface/include/isl/cpp.h")

add_executable(generate_template_isl isl_interface/generate_template_isl.cc)

find_program(CLANG_FORMAT_BIN clang-format PATHS ${CLANG_PREFIX}
PATH_SUFFIXES bin
NO_DEFAULT_PATH)

SET(ISL_TEMPLATE_CPP_DIR
"${CMAKE_CURRENT_BINARY_DIR}/isl_interface/include/isl")
SET(ISL_TEMPLATE_CPP_H "${ISL_TEMPLATE_CPP_DIR}/template_cpp.h")
add_custom_command(
OUTPUT ${ISL_TEMPLATE_CPP_H}
DEPENDS ${ISL_CPP_H}
DEPENDS generate_template_isl
COMMAND mkdir -p ${ISL_TEMPLATE_CPP_DIR}
COMMAND generate_template_isl < ${ISL_CPP_H} > ${ISL_TEMPLATE_CPP_H}
COMMAND ${CLANG_FORMAT_BIN} -i ${ISL_TEMPLATE_CPP_H}
)

if (WITH_BINDINGS)
add_subdirectory(isl_interface)

# generate_isl_cpp_h is the dependency that should be used
# by code that depends on the isl C++ bindings.
add_custom_target(generate_isl_cpp_h
DEPENDS generate_isl_cpp_h_core ${ISL_TEMPLATE_CPP_H})
else()
add_custom_target(generate_isl_cpp_h
DEPENDS ${ISL_TEMPLATE_CPP_H})
endif()
6 changes: 2 additions & 4 deletions isl_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ target_link_libraries(extract_isl_interface
# Dummy library to ensure that C++ bindings depend on contents of header files.
add_library(isl_all_h_dep STATIC ${ISL_DIR}/all.c)

SET(ISL_CPP_H "${CMAKE_CURRENT_LIST_DIR}/include/isl/cpp.h")
add_custom_command(
OUTPUT ${ISL_CPP_H}
DEPENDS isl_all_h_dep
Expand All @@ -106,6 +105,5 @@ add_custom_command(
COMMAND cat ${ISL_DIR}/cpp/cpp.h.bot >> ${ISL_CPP_H} || exit 1
DEPENDS extract_isl_interface
)
# generate_isl_cpp_h is the dependency that should be used
# by code that depends on the isl C++ bindings.
add_custom_target(generate_isl_cpp_h DEPENDS ${ISL_CPP_H})

add_custom_target(generate_isl_cpp_h_core DEPENDS ${ISL_CPP_H})
Loading