MCPcopy Create free account
hub / github.com/Xilinx/CHaiDNN / SwSoftmaxForward

Function SwSoftmaxForward

software/common/xi_kernels.cpp:302–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300void SwSoftmaxWrapper(IO_DATA_TYPE1 *softmax_in, IO_DATA_TYPE1 *sumBuffer, IO_DATA_TYPE1 *softmax_out, int *scalar_softmax_args);
301
302void SwSoftmaxForward(IO_DATA_TYPE *softmax_in, IO_DATA_TYPE1 *softmax_in1, IO_DATA_TYPE1 *sumBuffer, IO_DATA_TYPE1 *softmax_out, int *scalar_softmax_args)
303{
304
305#if 0
306 if(scalar_softmax_args[6] == OPCODE_FC2CONV)
307 {
308 int isize = scalar_softmax_args[0] * scalar_softmax_args[1];
309 fcOut_to_smaxIn((int16_t *)softmax_in, (int8_t *)softmax_in1, isize);
310 softmax_in = (int8_t*)softmax_in1;
311 }
312#endif
313
314#if 1
315 int prev_layer_type = scalar_softmax_args[2];
316 if(prev_layer_type != 6)//PERMUTE)
317 {
318 int isize = scalar_softmax_args[0] * scalar_softmax_args[1];
319 //# Read scale factor for input
320 //float *th_in_ptr = (float*)(&scalar_softmax_args[8]);
321 //float th_in = th_in_ptr[0];
322 //swfcOut_to_smaxIn1((IO_DATA_TYPE1 *)softmax_in, (int8_t *)softmax_in1, isize, th_in);
323 swfcOut_to_smaxIn((IO_DATA_TYPE1 *)softmax_in, (IO_DATA_TYPE1 *)softmax_in1, isize);
324 //IO_DATA_TYPE1 softmax_in = (IO_DATA_TYPE1*)softmax_in1;
325 }
326 else
327 {
328 softmax_in1 = (IO_DATA_TYPE1*)softmax_in;
329 }
330#endif
331
332 SwSoftmaxWrapper(softmax_in1, sumBuffer, softmax_out, scalar_softmax_args);
333}
334
335void DeconvWrapper(short* deconvIN, short* deconvWT, short* deconvBias, unsigned long long int* deconvIDout, int *scalar_deconv_args);
336//void DeconvForwardWrapper(short* in1, short* in2, short* in3, short* weights, short* bias, int * out, int *scalars)

Callers 1

softmaxRoutineFunction · 0.85

Calls 3

fcOut_to_smaxInFunction · 0.85
swfcOut_to_smaxInFunction · 0.85
SwSoftmaxWrapperFunction · 0.85

Tested by

no test coverage detected