- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hey everyone,
I am currently optimising code that performs a series of Hadamard (element-wise) divisions (1 ./ matrix) and matrix multiplications.
For example:
C = A[1 ⊘ B]
1, B ∈ R^d×d
A ∈ R^d×d
Currently, I implement the calculation in two steps:
vdDiv(d*d, mOnes, B, temp_M);
// mOnes is a matrix with all elements equal 1
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans,
d, d, d, alpha, A, d, temp_M, d, beta, C, d);
I want to avoid doing d^2+ d^3 operations and do instead just d^3 operations.
In theory, both steps could be performed in one procedure by defining C as:
(c_ij) = a_i1 / b_1j + a_2i / b_2j + ... + a_id / b_dj
Is there a way to implement this in MKL efficiently?
Many thanks and best,
Chris
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Chris,
Thanks for reaching out to us.
Could you please refer to the below link which contains the details of some functions of MKL which i guess might help you?
Regards,
Vidya.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Chris,
As we haven't heard back from you, could you please provide us with an update regarding your issue?
Regards,
Vidya.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Vidya,
Thank you for your reply!
I could not find any function in the documentation that provides the operation that I am seeking. Could you point me to a specific function that might solve the problem?
Many thanks and best,
Chris
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Chris,
The links in the earlier post lists out the routines which are extensions of BLAS that are available in MKL (i guess there is no direct routine available in MKL which combines both the cases hadamard division and gemm operation and as I mentioned you can refer to the extended functionalities of BLAS)
They may not exactly match the use case of yours but might help you for further stages.
Maybe using this function cblas-gemm-batch might help you but not sure https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/blas-like-extensions/cblas-gemm-batch.html
Regards,
Vidya.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Vidya,
Thank you!
It seems that it is not possible to perform the exact operation that I envisioned. I will try to find a work around. The question is answered for me, thank you.
Best,
Chris
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Chris,
>>The question is answered for me,
Thanks for the confirmation.
Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.
Have a Nice Day!
Regards,
Vidya.