makefile clean-all

This commit is contained in:
Blaise Tine 2024-05-27 20:03:16 -07:00
parent f0253a5f80
commit 9dbff0e77c
16 changed files with 78 additions and 94 deletions

View file

@ -22,13 +22,6 @@ clean:
$(MAKE) -C runtime clean
$(MAKE) -C tests clean
clean-all:
$(MAKE) -C hw clean
$(MAKE) -C sim clean
$(MAKE) -C kernel clean
$(MAKE) -C runtime clean
$(MAKE) -C tests clean-all
# Install setup
KERNEL_INC_DST = $(PREFIX)/kernel/include
KERNEL_LIB_DST = $(PREFIX)/kernel/lib$(XLEN)

View file

@ -193,7 +193,7 @@ then
if [ $REBUILD -eq 1 ] || [ "$CONFIGS+$DEBUG+$SCOPE" != "$LAST_CONFIGS" ];
then
make -C $DRIVER_PATH clean > /dev/null
make -C $DRIVER_PATH clean-driver > /dev/null
echo "$CONFIGS+$DEBUG+$SCOPE" > $BLACKBOX_CACHE
fi
fi

View file

@ -235,12 +235,10 @@ config()
CONFIGS="-DISSUE_WIDTH=4 -DNUM_LSU_BLOCK=4 -DNUM_LSU_LANES=4" ./ci/blackbox.sh --driver=simx --app=vecaddx
# custom program startup address
make -C tests/regression/dogfood clean-all
make -C tests/regression/dogfood clean-kernel
STARTUP_ADDR=0x40000000 make -C tests/regression/dogfood
CONFIGS="-DSTARTUP_ADDR=0x40000000" ./ci/blackbox.sh --driver=simx --app=dogfood
CONFIGS="-DSTARTUP_ADDR=0x40000000" ./ci/blackbox.sh --driver=rtlsim --app=dogfood
make -C tests/regression/dogfood clean-all
make -C tests/regression/dogfood
./ci/blackbox.sh --driver=simx --app=dogfood
./ci/blackbox.sh --driver=rtlsim --app=dogfood
# disabling M & F extensions
make -C sim/rtlsim clean && CONFIGS="-DEXT_M_DISABLE -DEXT_F_DISABLE" make -C sim/rtlsim > /dev/null

View file

@ -15,7 +15,7 @@ You can execute the same application of a GPU architecture with 2 cores:
$ ./ci/blackbox.sh --core=2 --driver=simx --app=sgemm --args="-n10"
When excuting, Blackbox needs to recompile the driver if the desired architecture changes.
When excuting, Blackbox needs to recompile the driver if the desired architecture changes.
It tracks the latest configuration in a file under the current directory blackbox.<driver>.cache.
To avoid having to rebuild the driver all the time, Blackbox checks if the latest cached configuration matches the current.
@ -24,24 +24,27 @@ To avoid having to rebuild the driver all the time, Blackbox checks if the lates
The Vortex test suite is located under the /test/ folder
You can execute the default regression suite by running the following commands at the root folder.
$ make -C tests/regression run-simx
$ make -C tests/regression run-simx
$ make -C tests/regression run-rtlsim
You can execute the default opncl suite by running the following commands at the root folder.
$ make -C tests/opencl run-simx
$ make -C tests/opencl run-simx
$ make -C tests/opencl run-rtlsim
## Creating Your Own Regression Tests
- Inside `test/` you will find a series of folders which are named based on what they test
- You can view the tests to see which ones have tests similar to what you are trying to create new tests for
- once you have found a similar baseline, you can copy the folder and rename it to what you are planning to test
- `testcases.h` contains each of the test case templates
- `main.cpp` contains the implementation of each of the test cases and builds a test suite of all the tests cases you want
## Creating Your Own Regression Test
Compile the test case: `make -C tests/regression/<testcase-name>/ clean-all && make -C tests/regression/<testcase-name>/`
Inside `tests/regression` you will find a series of folders which are named based on what they test.
You can view the tests to see which ones have tests similar to what you are trying to create new tests for.
Once you have found a similar baseline, you can copy the folder and rename it to what you are planning to test.
A regression test typically implements the following files:
- ***kernel.cpp*** contains the GPU kernel code.
- ***main.cpp*** contains the host CPU code.
- ***Makefile*** defines the compiler build commands for the CPU and GPU binaries.
Run the test case: `./ci/blackbox.sh --driver=simx --cores=4 --app=<testcase-name> --debug`
Compile your test: `make -C tests/regression/<test-name>`
Run your test: `./ci/blackbox.sh --driver=simx --app=<test-name> --debug`
## Adding Your Tests to the CI Pipeline
see `continuous_integration.md`
See `continuous_integration.md`

View file

@ -19,10 +19,10 @@ xrt:
$(MAKE) -C xrt
clean:
$(MAKE) clean -C stub
$(MAKE) clean -C simx
$(MAKE) clean -C rtlsim
$(MAKE) clean -C opae
$(MAKE) clean -C xrt
$(MAKE) -C stub clean
$(MAKE) -C simx clean
$(MAKE) -C rtlsim clean
$(MAKE) -C opae clean
$(MAKE) -C xrt clean
.PHONY: all stub simx rtlsim opae xrt clean

View file

@ -53,12 +53,20 @@ PROJECT := libvortex-opae.so
all: $(DESTDIR)/$(PROJECT)
driver: $(DESTDIR)/libopae-c-sim.so
$(DESTDIR)/libopae-c-sim.so:
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/opaesim $(DESTDIR)/libopae-c-sim.so
$(DESTDIR)/$(PROJECT): $(SRCS) $(OPAESIM)
$(CXX) $(CXXFLAGS) $(SRCS) $(LDFLAGS) -o $@
clean:
clean-driver:
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/opaesim clean
clean-runtime:
rm -f $(DESTDIR)/$(PROJECT)
clean: clean-driver clean-runtime
.PHONY: all driver clean-driver clean-runtime clean

View file

@ -30,12 +30,20 @@ PROJECT := libvortex-rtlsim.so
all: $(DESTDIR)/$(PROJECT)
driver: $(DESTDIR)/librtlsim.so
$(DESTDIR)/librtlsim.so:
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/rtlsim $(DESTDIR)/librtlsim.so
$(DESTDIR)/$(PROJECT): $(SRCS) $(DESTDIR)/librtlsim.so
$(CXX) $(CXXFLAGS) $(SRCS) $(LDFLAGS) -o $@
clean:
clean-driver:
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/rtlsim clean-lib
rm -f $(DESTDIR)/$(PROJECT)
clean-runtime:
rm -f $(DESTDIR)/$(PROJECT)
clean: clean-driver clean-runtime
.PHONY: all driver clean-driver clean-runtime clean

View file

@ -26,12 +26,20 @@ PROJECT := libvortex-simx.so
all: $(DESTDIR)/$(PROJECT)
driver: $(DESTDIR)/libsimx.so
$(DESTDIR)/libsimx.so:
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/simx $(DESTDIR)/libsimx.so
$(DESTDIR)/$(PROJECT): $(SRCS) $(DESTDIR)/libsimx.so
$(CXX) $(CXXFLAGS) $(SRCS) $(LDFLAGS) -o $@
clean:
clean-driver:
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/simx clean-lib
rm -f $(DESTDIR)/$(PROJECT)
clean-runtime:
rm -f $(DESTDIR)/$(PROJECT)
clean: clean-driver clean-runtime
.PHONY: all driver clean-driver clean-runtime clean

View file

@ -27,4 +27,6 @@ $(DESTDIR)/$(PROJECT): $(SRCS)
$(CXX) $(CXXFLAGS) $^ $(LDFLAGS) -o $@
clean:
rm -f $(DESTDIR)/$(PROJECT)
rm -f $(DESTDIR)/$(PROJECT)
.PHONY: all clean

View file

@ -41,13 +41,20 @@ endif
all: $(DESTDIR)/$(PROJECT)
driver: $(DESTDIR)/libxrtsim.so
$(DESTDIR)/libxrtsim.so:
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/xrtsim $(DESTDIR)/libxrtsim.so
$(DESTDIR)/$(PROJECT): $(SRCS) $(XRTSIM)
$(CXX) $(CXXFLAGS) $(SRCS) $(LDFLAGS) -o $@
clean:
clean-driver:
DESTDIR=$(DESTDIR) $(MAKE) -C $(ROOT_DIR)/sim/xrtsim clean
clean-runtime:
rm -f $(DESTDIR)/$(PROJECT)
clean: clean-driver clean-runtime
.PHONY: all driver clean-driver clean-runtime clean

View file

@ -5,7 +5,7 @@ all: unittest kernel regression opencl riscv
unittest:
$(MAKE) -C unittest
kernel:
$(MAKE) -C kernel
@ -27,11 +27,4 @@ clean:
$(MAKE) -C opencl clean
$(MAKE) -C riscv clean
clean-all:
$(MAKE) -C unittest clean
$(MAKE) -C kernel clean
$(MAKE) -C regression clean-all
$(MAKE) -C opencl clean-all
$(MAKE) -C riscv clean
.PHONY: all unittest kernel regression opencl riscv

View file

@ -109,26 +109,4 @@ clean:
$(MAKE) -C bfs clean
$(MAKE) -C sgemm2 clean
$(MAKE) -C sgemm3 clean
$(MAKE) -C psum clean
clean-all:
$(MAKE) -C vecadd clean-all
$(MAKE) -C sgemm clean-all
$(MAKE) -C conv3 clean-all
$(MAKE) -C psort clean-all
$(MAKE) -C saxpy clean-all
$(MAKE) -C sfilter clean-all
$(MAKE) -C oclprintf clean-all
$(MAKE) -C dotproduct clean-all
$(MAKE) -C transpose clean-all
$(MAKE) -C spmv clean-all
$(MAKE) -C stencil clean-all
$(MAKE) -C lbm clean-all
$(MAKE) -C nearn clean-all
$(MAKE) -C guassian clean-all
$(MAKE) -C kmeans clean-all
$(MAKE) -C blackscholes clean-all
$(MAKE) -C bfs clean-all
$(MAKE) -C sgemm2 clean-all
$(MAKE) -C sgemm3 clean-all
$(MAKE) -C psum clean-all
$(MAKE) -C psum clean

View file

@ -127,11 +127,13 @@ endif
.depend: $(SRCS)
$(CXX) $(CXXFLAGS) -MM $^ > .depend;
clean:
clean-kernel:
rm -rf *.dump *.pocl
clean-host:
rm -rf $(PROJECT) $(PROJECT).host *.o *.log .depend
clean-all: clean
rm -rf *.dump *.pocl
clean: clean-kernel clean-host
ifneq ($(MAKECMDGOALS),clean)
-include .depend

View file

@ -74,19 +74,4 @@ clean:
$(MAKE) -C vecaddx clean
$(MAKE) -C sgemmx clean
$(MAKE) -C conv3x clean
$(MAKE) -C sgemm2x clean
clean-all:
$(MAKE) -C basic clean-all
$(MAKE) -C demo clean-all
$(MAKE) -C dogfood clean-all
$(MAKE) -C mstress clean-all
$(MAKE) -C io_addr clean-all
$(MAKE) -C printf clean-all
$(MAKE) -C diverge clean-all
$(MAKE) -C sort clean-all
$(MAKE) -C fence clean-all
$(MAKE) -C vecaddx clean-all
$(MAKE) -C sgemmx clean-all
$(MAKE) -C conv3x clean-all
$(MAKE) -C sgemm2x clean-all
$(MAKE) -C sgemm2x clean

View file

@ -104,11 +104,13 @@ endif
.depend: $(SRCS)
$(CXX) $(CXXFLAGS) -MM $^ > .depend;
clean:
clean-kernel:
rm -rf *.elf *.vxbin *.dump
clean-host:
rm -rf $(PROJECT) *.o *.log .depend
clean-all: clean
rm -rf *.elf *.vxbin *.dump
clean: clean-kernel clean-host
ifneq ($(MAKECMDGOALS),clean)
-include .depend

View file

@ -5,7 +5,7 @@ CXXFLAGS += -I$(VORTEX_RT_PATH)/common
# Debugigng
ifdef DEBUG
CXXFLAGS += -g -O0
else
else
CXXFLAGS += -O2 -DNDEBUG
endif
@ -20,9 +20,6 @@ run:
clean:
rm -rf $(PROJECT) *.o *.log .depend
clean-all: clean
rm -rf *.elf *.bin *.dump
ifneq ($(MAKECMDGOALS),clean)
-include .depend
endif