MCPcopy Create free account
hub / github.com/Samsung/ONE / writeTensorToHDF5File

Function writeTensorToHDF5File

compiler/nnc/utils/input_gen/tensor_gen.cpp:158–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158static void writeTensorToHDF5File(const vector<hsize_t> &dimensions, const string &tensor_name,
159 const string &file_name, Tensor &tensor)
160{
161 H5::H5File h5File(file_name + ".hdf5", H5F_ACC_TRUNC);
162 H5::DataSpace dataspace(dimensions.size(), &dimensions[0]);
163 auto dataset = h5File.createDataSet(tensor_name, H5::PredType::IEEE_F32BE, dataspace);
164 dataset.write(tensor.data(), H5::PredType::NATIVE_FLOAT);
165}
166
167int main(int argc, char *argv[])
168{

Callers 1

mainFunction · 0.70

Calls 3

sizeMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected