Skip to content

Commit 2596708

Browse files
committed
Add initial code
Define directory structure and add initial EFA data path CUDA implementation along with getting-started documentation with code examples. Signed-off-by: Michael Margolin <mrgolin@amazon.com>
1 parent 1707827 commit 2596708

9 files changed

Lines changed: 1709 additions & 5 deletions

File tree

CUDA/Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
NVCC=nvcc
2+
NVCC_FLAGS=-G -rdc=true
3+
CUDA_FLAGS=-Xcompiler -fPIC
4+
5+
SRCDIR=src
6+
BUILDDIR=build
7+
INCDIR=$(BUILDDIR)/include
8+
9+
all: $(BUILDDIR)/libefacudadp.so headers
10+
11+
$(BUILDDIR):
12+
mkdir -p $(BUILDDIR)
13+
14+
$(INCDIR): | $(BUILDDIR)
15+
mkdir -p $(INCDIR)
16+
17+
headers: $(INCDIR)
18+
cp $(SRCDIR)/*.h $(SRCDIR)/*.cuh $(INCDIR)/
19+
20+
$(BUILDDIR)/libefacudadp.so: $(BUILDDIR)/efa_cuda_dp.cu.o $(BUILDDIR)/efa_cuda_dp.o | $(BUILDDIR)
21+
$(NVCC) $(NVCC_FLAGS) -shared -o $@ $^
22+
23+
$(BUILDDIR)/efa_cuda_dp.cu.o: $(SRCDIR)/efa_cuda_dp.cu $(SRCDIR)/efa_cuda_dp.cuh $(SRCDIR)/efa_cuda_dp_impl.cuh | $(BUILDDIR)
24+
$(NVCC) $(NVCC_FLAGS) -c $< $(CUDA_FLAGS) -o $@
25+
26+
$(BUILDDIR)/efa_cuda_dp.o: $(SRCDIR)/efa_cuda_dp.cpp $(SRCDIR)/efa_cuda_dp.h $(SRCDIR)/efa_cuda_dp.cuh | $(BUILDDIR)
27+
$(NVCC) $(NVCC_FLAGS) -c $< $(CUDA_FLAGS) -o $@
28+
29+
clean:
30+
rm -rf $(BUILDDIR)

0 commit comments

Comments
 (0)