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 -mno-avx512f -fopenmp -I/usr/local/cuda/include
|
|
|
|
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)
|
2023-02-08 22:35:31 +09:00
|
|
|
|
|
|
|
run: main
|
2023-02-10 02:15:36 +09:00
|
|
|
sbatch run.sh model/weights.bin img/bin/img1.bin output.bin 1
|