| 629 | //! |
| 630 | template <typename T> |
| 631 | bool process(SampleIOFormats& sample, sample::Logger::TestAtom const& sampleTest, SampleBuffer& inputBuf, |
| 632 | SampleBuffer& outputBuf, SampleBuffer& goldenInput) |
| 633 | { |
| 634 | sample::gLogInfo << "Building and running a GPU inference engine with specified I/O formats." << std::endl; |
| 635 | |
| 636 | inputBuf = SampleBuffer(sample.mInputDims, sizeof(T), sample.mTensorFormat, true); |
| 637 | outputBuf = SampleBuffer(sample.mOutputDims, sizeof(float), TensorFormat::kLINEAR, false); |
| 638 | if (!sample.build(sizeof(T))) |
| 639 | { |
| 640 | return false; |
| 641 | } |
| 642 | convertGoldenData<T>(goldenInput, inputBuf); |
| 643 | |
| 644 | if (!sample.infer(inputBuf, outputBuf)) |
| 645 | { |
| 646 | return false; |
| 647 | } |
| 648 | |
| 649 | if (!sample.verifyOutput<T>(outputBuf, sample.mDigit)) |
| 650 | { |
| 651 | return false; |
| 652 | } |
| 653 | |
| 654 | return true; |
| 655 | } |
| 656 | |
| 657 | bool runFP32Reference(SampleIOFormats& sample, sample::Logger::TestAtom const& sampleTest, SampleBuffer& goldenInput, |
| 658 | SampleBuffer& goldenOutput) |
nothing calls this directly
no test coverage detected