chundoong-lab-ta/APWS23/project/Makefile

35 lines
772 B
Makefile
Raw Normal View History

2023-02-01 22:30:00 +09:00
TARGET=main
2023-02-02 19:02:36 +09:00
OBJECTS=main.o util.o uNet.o tensor.o
2023-02-01 22:30:00 +09:00
CFLAGS=-std=c++14 -O3 -Wall -march=native -mavx2 -mfma -fopenmp -I/usr/local/cuda/include
2023-02-01 22:30:00 +09:00
CUDA_CFLAGS:=$(foreach option, $(CFLAGS),-Xcompiler=$(option))
LDFLAGS=-pthread -L/usr/local/cuda/lib64
LDLIBS= -lstdc++ -lcudart -lm
CXX=g++
CUX=/usr/local/cuda/bin/nvcc
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(LDLIBS)
%.o: %.cpp
$(CXX) $(CFLAGS) -c -o $@ $^
%.o: %.cu
$(CUX) $(CUDA_CFLAGS) -c -o $@ $^
clean:
rm -rf $(TARGET) $(OBJECTS)
run: main
2023-02-14 18:53:50 +09:00
sbatch run.sh model/weights.bin img/bin/img1.bin output1.bin 1
run2: main
sbatch run.sh model/weights.bin img/bin/img2N.bin output2N.bin 2
run4: main
sbatch run.sh model/weights.bin img/bin/img4N.bin output4N.bin 4