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

Function outputWrite

software/interface/xi_readwrite_util.cpp:850–979  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

848
849
850int outputWrite(char *dir_path, char *inp_file_name, std::vector<void *> unpack_output, int numImg_to_process, io_layer_info io_layer_info_ptr, int ping_pong)
851{
852 int en_batch_size_one;
853
854 if(numImg_to_process == 2)
855 en_batch_size_one = 0;
856 else
857 en_batch_size_one = 1;
858
859#if HW_DBG
860 //////////// Network name fetch
861 char network_name[500];
862 for(int i=0;i<100;i++)
863 {
864 network_name[i]=0;
865 }
866 {
867 char *path = dir_path;
868 char *ssc;
869 ssc = strstr(path, "models");
870 int l = strlen(ssc) + 1;
871 path = &path[strlen(path)-l+8];
872 int l1 = strlen(path)+1;
873 for(int i=0;i<(l1);i++)
874 {
875 network_name[i]=path[i];
876 }
877 //fprintf(stderr,"%s\n",network_name);
878 }
879
880
881 char file_name2[500];
882 sprintf(file_name2, "%s", inp_file_name);
883 char *file_name = (char *)file_name2;
884 char *ssc;
885 int l = 0;
886 ssc = strstr(file_name, "/");
887 do{
888 l = strlen(ssc) + 1;
889 file_name = &file_name[strlen(file_name)-l+2];
890 ssc = strstr(file_name, "/");
891 }while(ssc);
892 fprintf(stderr, "%s\n", file_name);
893
894 char *file_name1 = strstr(file_name, ".");
895 l = strlen(file_name);
896 int l1 = strlen(file_name1);
897 file_name[l-l1] = '\0';
898 fprintf(stderr,"output file name:%s\n",file_name);
899
900#endif
901
902 /* for layer name */
903 int kernelType = io_layer_info_ptr.out_kerType;
904 int outSize = io_layer_info_ptr.out_size;
905
906 //# Write file for checking error
907 char out_path[500];

Callers 7

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

argmaxLayerFunction · 0.70

Tested by

no test coverage detected