You might be able to snipe r740 for under 1.6k; But improvement ain't going to be revolutionary.
If you want big boost; you should look at the R7515
1xEPYC 7402P(24Core 2.8GHz). 4xDDR4 32G 2400MHz. Note : If the label is a second-hand product, there may be wear and scratches on the appearance. The photos on the link are inventory photos, not actual photos.
www.ebay.com
ex.
(Gold 6138 is one of the better cpu's on Rx40 platform - skylake, without price being inflated to moon)
Potentially you should upgrade your Tesla cards, P100/P40 (100-200 usd), or V100's (500usd), or oem 3090 (800 usd)
P100 (219 usd)
Cloud Storage Corp © 2020. Ending Soon. New Arrivals. QUICK LINKS. We are here 24/7, should you need any help.
www.ebay.com
V100 (509 usd)
Find many great new & used options and get the best deals for Nvidia Tesla V100 GPU 16GB Accelerator Card HBM2 5120 Cuda Cores 1245 MHz 300W at the best online prices at eBay! Free shipping for many products!
www.ebay.com
oem 3090 (815 usd)
Find many great new & used options and get the best deals for Nvidia GeForce RTX 3090 Graphics Card (GDDR6 24GB VRAM) Dell OEM Alienware at the best online prices at eBay! Free shipping for many products!
www.ebay.com
(Your 2x M40's could be replaced by single A4000 ~ or A5000)
A4000 (602 usd)
Find many great new & used options and get the best deals for NVIDIA RTX A4000 16GB GDDR6 Graphics Cards, Like New at the best online prices at eBay! Free shipping for many products!
www.ebay.com
A5000 (1k) ~ this one supports sriov, its very nice card.
Find many great new & used options and get the best deals for NVIDIA RTX A5000 24GB GDDR6 Graphics Card at the best online prices at eBay! Free shipping for many products!
www.ebay.com
(Upgrading to 1xA5000 from 2x M40 going be revolutionary even in current platform)