alibaba / ai-matrix

To make it easy to benchmark AI accelerators
Other
179 stars 79 forks source link

Use dense Adam by convert indexedslices to tensor in DIEN #70

Open retonym opened 4 years ago

retonym commented 4 years ago

The new implementation converts indexedslices to tensor in Adam optimizer. Tensorflow use a single op "apply_adam" to deal with tensors, while use many small ops to deal wth indexedslices in sparse Adam implementation. To use tensors avoids to load these small ops repeatedly and saves time. In my experiment, this change improves about 12% throughput with batch size 128 on Intel Xeon 8260 processors.

CLAassistant commented 4 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Zantares commented 4 years ago

@retonym your CLA is not signed, please check the reply of @CLAassistant to continue the process.

retonym commented 4 years ago

I have move the changes of this PR to DIEN_TF2 folder. It will not influence the code in the original DIEN folder.