| 1525 | |
| 1526 | template <typename ElementType, typename OutputType> |
| 1527 | port::Status PrepareForConvolution( |
| 1528 | ConvolutionKind kind, Stream* stream, |
| 1529 | const BatchDescriptor& batch_descriptor, |
| 1530 | DeviceMemory<ElementType> input_data, |
| 1531 | const FilterDescriptor& filter_descriptor, |
| 1532 | DeviceMemory<ElementType> filter_data, |
| 1533 | const BatchDescriptor& output_descriptor, |
| 1534 | DeviceMemory<OutputType> output_data, |
| 1535 | const ConvolutionDescriptor& convolution_descriptor, |
| 1536 | const AlgorithmConfig& algorithm_config, |
| 1537 | ScratchAllocator* scratch_allocator, AlgorithmDesc* algorithm_desc, |
| 1538 | DeviceMemory<uint8>* scratch_memory) { |
| 1539 | return DoPrepareForConvolution( |
| 1540 | kind, ToDataType<ElementType>::value, stream, batch_descriptor, |
| 1541 | input_data, filter_descriptor, filter_data, output_descriptor, |
| 1542 | output_data, convolution_descriptor, algorithm_config, |
| 1543 | scratch_allocator, algorithm_desc, scratch_memory); |
| 1544 | } |
| 1545 | |
| 1546 | // Enqueues a single-precision convolution operation onto the stream. |
| 1547 | // |