gagneurlab / MMSplice_MTSplice

Tissue-specific variant effect predictions on splicing
MIT License
39 stars 21 forks source link

running predictions with tensorflow is slow #60

Open dagap opened 2 years ago

dagap commented 2 years ago

Description

Running mmsplice on a GPU-enabled machine is very slow. I have a NVIDIA RTX A5000 with 24 GB memory and running mmsplice is 10x slower than running on CPU with 10 cores. Has anyone benchmarked the GPU speedups?

I am running the latest drivers and cuda version 11.6. Tensorflow detects the GPU just fine.

What I Did

start_time = time.time()
gtf = 'gtf_file_coding.gtf'
dl = SplicingVCFDataloader(gtf, fasta, vcf)
model = MMSplice()
output_csv = 'preds.csv'
predict_save(model, dl, output_csv, pathogenicity=True, splicing_efficiency=True)  # also used higher batch size
print("Seconds since epoch with GTF =", seconds)
df = pd.read_csv(output_csv)
df = max_varEff(df)
df.to_csv('preds_max.csv')
print('TOTAL EXECUTION TIME ...')
print("--- %s seconds ---" % (time.time() - start_time))