This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MXNET-486] Create CPP test for concat MKLDNN operator (#11371)
* create func to generate new outputs for concat output * provide type for vectors * fix concat dict * change value to string * use different datatype * create GetExpandedMemPD helper * update input num * fix dim range * use only new shape * add comments * replace all with new_shape * consolidate testop * remove init interface * use GetTestOutputArraysConcat for concat op * out arrays in correct scope * add VerifyConcatResult * noop for kWriteInPlace for concat * refactor GetTestOutputArrays and GetTestOutputArraysConcat into one method * create temp ndarrays in same scope as assert * add message for GetTestOutputArraysConcat * filter when dim too large * fix print message * reshape concat output so it can be read * check concat on diff dim * add VerifyConcatBackwardsResult bp * reshape if view and mkldnn * finish VerifyConcatBackwardsResult * reverse input output for concat backwards * do not rand output for concat backwards * make mulitple copies of inputs for ops that need mult unique inputs * swap input/output msg * create test inputs can create expanded inputs * add verify msg to test * fix slice of input * remove unused test * missing assignment * fix slice amount for diff dim concat * shrink outputs for concat backwards * revert switching input/output for concat/backwards * create multiple copies of output * reorder concat input grad * increase num of input for concat backwards * concat dst is smaller array * use output vs input mem to determine shape and as tmp storage * do not support mkldnn concat if mkl layout diff from nd layout * reorder if view /mkldnn * exclude views from concat * remove unused header * remove check for view in mkldnn_concat * remove unused heaeder * skip test * rename target_shape to shape * remove rand var and default outputs to rand * rename target_pd to pd * fix lint issues * add space to error msg * do not use mkldnn for forward concat if layout mismatch * create temp shape var * do not check if view in concat * convert dim to unsigned int * fix lint * check view first * check type before creating mem * check all inputs for concat mkldnn * remove getshapestring * add comments for verify concat helpres * revert adding USE_MKLDNN flag * use reference for arrays in concat mkldnn check * fix indent * set default num_inputs to 1 * revert change to test_ctc_loss_train * add error message to check * use reference of arr in loops * remove extra space * use default num_inputs * use reference for all loops * fix lint * use separate concat test * remove reference from pd * do not use reference for shape * change conditional in gettestinputarray * remove reference * fix lint * increase num_inputs to 3 * remove extra out_arr var * retrigger * increase num_inputs
- Loading branch information