Skip to content

Commit 1156836

Browse files
committed
Various Thrust/CUB integrated DVS packaging fixes.
1 parent b9a7823 commit 1156836

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

Makefile

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -160,27 +160,24 @@ $(info #### CXX_STD : $(CXX_STD))
160160

161161
ifeq ($(OS), win32)
162162
CREATE_DVS_PACKAGE = $(ZIP) -r built/CUDA-thrust-package.zip bin thrust/internal/test thrust/internal/scripts thrust/internal/benchmark thrust/*.trs $(DVS_COMMON_TEST_PACKAGE_FILES)
163-
APPEND_THRUST_H_DVS_PACKAGE = $(ZIP) -rg built/CUDA-thrust-package.zip thrust -9 -i *.h
164-
APPEND_THRUST_INL_DVS_PACKAGE = $(ZIP) -rg built/CUDA-thrust-package.zip thrust -9 -i *.inl
165-
APPEND_THRUST_CUH_DVS_PACKAGE = $(ZIP) -rg built/CUDA-thrust-package.zip thrust -9 -i *.cuh
166-
APPEND_CUB_CUH_DVS_PACKAGE = $(ZIP) -rg built/CUDA-thrust-package.zip ../cub -9 -i *.cuh
167-
APPEND_H_DVS_PACKAGE = $(APPEND_THRUST_H_DVS_PACKAGE)
168-
APPEND_INL_DVS_PACKAGE = $(APPEND_THRUST_INL_DVS_PACKAGE)
169-
APPEND_CUH_DVS_PACKAGE = $(APPEND_THRUST_CUH_DVS_PACKAGE) $(APPEND_CUB_CUH_DVS_PACKAGE)
163+
APPEND_H_DVS_PACKAGE = $(ZIP) -rg built/CUDA-thrust-package.zip thrust -9 -i *.h
164+
APPEND_INL_DVS_PACKAGE = $(ZIP) -rg built/CUDA-thrust-package.zip thrust -9 -i *.inl
165+
APPEND_CUH_DVS_PACKAGE = $(ZIP) -rg built/CUDA-thrust-package.zip thrust -9 -i *.cuh
170166
MAKE_DVS_PACKAGE = $(CREATE_DVS_PACKAGE) && $(APPEND_H_DVS_PACKAGE) && $(APPEND_INL_DVS_PACKAGE) && $(APPEND_CUH_DVS_PACKAGE)
171167
else
172-
CREATE_DVS_PACKAGE = tar -cv -f built/CUDA-thrust-package.tar bin thrust/internal/test thrust/internal/scripts thrust/internal/benchmark thrust/*.trs $(DVS_COMMON_TEST_PACKAGE_FILES)
173-
APPEND_THRUST_H_DVS_PACKAGE = find thrust -name "*.h" | xargs tar rvf built/CUDA-thrust-package.tar
174-
APPEND_THRUST_INL_DVS_PACKAGE = find thrust -name "*.inl" | xargs tar rvf built/CUDA-thrust-package.tar
175-
APPEND_THRUST_CUH_DVS_PACKAGE = find thrust -name "*.cuh" | xargs tar rvf built/CUDA-thrust-package.tar
176-
APPEND_CUB_CUH_DVS_PACKAGE = find ../cub -name "*.cuh" | xargs tar rvf built/CUDA-thrust-package.tar
177-
APPEND_H_DVS_PACKAGE = $(APPEND_THRUST_H_DVS_PACKAGE)
178-
APPEND_INL_DVS_PACKAGE = $(APPEND_THRUST_INL_DVS_PACKAGE)
179-
APPEND_CUH_DVS_PACKAGE = $(APPEND_THRUST_CUH_DVS_PACKAGE) $(APPEND_CUB_CUH_DVS_PACKAGE)
180-
COMPRESS_DVS_PACKAGE = bzip2 built/CUDA-thrust-package.tar
168+
CREATE_DVS_PACKAGE = tar -cvh -f built/CUDA-thrust-package.tar bin thrust/internal/test thrust/internal/scripts thrust/internal/benchmark thrust/*.trs $(DVS_COMMON_TEST_PACKAGE_FILES)
169+
APPEND_H_DVS_PACKAGE = find -L thrust -name "*.h" | xargs tar rvf built/CUDA-thrust-package.tar
170+
APPEND_INL_DVS_PACKAGE = find -L thrust -name "*.inl" | xargs tar rvf built/CUDA-thrust-package.tar
171+
APPEND_CUH_DVS_PACKAGE = find -L thrust -name "*.cuh" | xargs tar rvf built/CUDA-thrust-package.tar
172+
COMPRESS_DVS_PACKAGE = bzip2 --force built/CUDA-thrust-package.tar
181173
MAKE_DVS_PACKAGE = $(CREATE_DVS_PACKAGE) && $(APPEND_H_DVS_PACKAGE) && $(APPEND_INL_DVS_PACKAGE) && $(APPEND_CUH_DVS_PACKAGE) && $(COMPRESS_DVS_PACKAGE)
182174
endif
183175

176+
ifeq ($(OS), win32)
177+
COPY_CUB_FOR_PACKAGING = mv cub cub-link && cp -r ../cub/cub cub
178+
RESTORE_CUB_LINK = rm -rf cub && mv cub-link cub
179+
endif
180+
184181
DVS_OPTIONS :=
185182

186183
ifneq ($(TARGET_ARCH),$(HOST_ARCH))
@@ -196,9 +193,11 @@ pack:
196193
cd .. && $(MAKE_DVS_PACKAGE)
197194

198195
dvs:
196+
$(COPY_CUB_FOR_PACKAGING)
199197
$(MAKE) $(DVS_OPTIONS) -s -C ../cuda $(THRUST_DVS_BUILD)
200198
$(MAKE) $(DVS_OPTIONS) $(THRUST_DVS_BUILD) THRUST_DVS=1
201199
cd .. && $(MAKE_DVS_PACKAGE)
200+
$(RESTORE_CUB_LINK)
202201

203202
# XXX Deprecated, remove.
204203
dvs_nightly: dvs

0 commit comments

Comments
 (0)