Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit c00960e

Browse files
committed
Revert back to inlined files due to verify perf regression
1 parent ec8a282 commit c00960e

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

src/Makefile

+3-13
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ all: $V/$(CHACHA_TEST_BIN) $V/$(ECC_TEST_BIN) $(V)/lib$(LIB).so
2525

2626
ECC_DIR:=cuda-ecc-ed25519
2727

28-
SC_SRCS:=$(addprefix $(ECC_DIR)/,sc.cu ed25519.h ge.h)
29-
$V/sc.o: $(SC_SRCS)
30-
@mkdir -p $(@D)
31-
$(NVCC) -rdc=true $(CFLAGS) -c $< -o $@
32-
3328
KEYPAIR_SRCS:=$(addprefix $(ECC_DIR)/,keypair.cu ed25519.h ge.h)
3429
$V/keypair.o: $(KEYPAIR_SRCS)
3530
@mkdir -p $(@D)
@@ -40,17 +35,12 @@ $V/seed.o: $(SEED_SRCS)
4035
@mkdir -p $(@D)
4136
$(NVCC) -rdc=true $(CFLAGS) -c $< -o $@
4237

43-
GE_SRCS:=$(addprefix $(ECC_DIR)/,ge.cu ge.h precomp_data.h)
44-
$V/ge.o: $(GE_SRCS)
45-
@mkdir -p $(@D)
46-
$(NVCC) -rdc=true $(CFLAGS) -c $< -o $@
47-
4838
SIGN_SRCS:=$(addprefix $(ECC_DIR)/,sign.cu sha512.h ge.h sc.h fe.cu ../$(CUDA_HEADER_DIR)/gpu_common.h ed25519.h)
4939
$V/sign.o: $(SIGN_SRCS)
5040
@mkdir -p $(@D)
5141
$(NVCC) -rdc=true $(CFLAGS) -c $< -o $@
5242

53-
VERIFY_SRCS:=$(addprefix $(ECC_DIR)/,verify.cu seed.cu sha512.cu ge.h sc.cu fe.cu keypair.cu common.cu ed25519.h)
43+
VERIFY_SRCS:=$(addprefix $(ECC_DIR)/,verify.cu sha512.cu ge.cu sc.cu fe.cu keypair.cu common.cu ed25519.h)
5444
$V/verify.o: $(VERIFY_SRCS)
5545
@mkdir -p $(@D)
5646
$(NVCC) -rdc=true $(CFLAGS) -c $< -o $@
@@ -79,10 +69,10 @@ $V/poh_verify.o: $(POH_SRCS)
7969
@mkdir -p $(@D)
8070
$(NVCC) -rdc=true $(CFLAGS) -c $< -o $@
8171

82-
CPU_GPU_OBJS=$(addprefix $V/,chacha_cbc.o aes_cbc.o verify.o poh_verify.o gpu_ctx.o sign.o ge.o seed.o keypair.o sc.o)
72+
CPU_GPU_OBJS=$(addprefix $V/,chacha_cbc.o aes_cbc.o verify.o poh_verify.o gpu_ctx.o sign.o seed.o keypair.o)
8373

8474
$V/crypt-dlink.o: $(CPU_GPU_OBJS)
85-
$(NVCC) -Xcompiler "-fPIC" --gpu-architecture=compute_61 --device-link $^ --output-file $@
75+
$(NVCC) -Xcompiler "-fPIC" $(CFLAGS) --device-link $^ --output-file $@
8676

8777
$V/lib$(LIB).so: $V/crypt-dlink.o $(CPU_GPU_OBJS)
8878
$(NVCC) -Xcompiler "-fPIC" --shared --output-file $@ $^

src/cuda-ecc-ed25519/verify.cu

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include "sha512.h"
22
#include <algorithm>
33
#include <stdio.h>
4-
#include "sc.h"
4+
#include "sc.cu"
55
#include "fe.cu"
6-
#include "ge.h"
6+
#include "ge.cu"
77
#include "sha512.cu"
88

99
#include "ed25519.h"

0 commit comments

Comments
 (0)