Intel DAAL AI加速——支持从数据预处理到模型预测,数据源必须使用DAAL的底层封装库
2023-09-14 09:11:52 时间
数据源加速见官方文档(必须使用DAAL自己的库):
可以看到支持的数据源:同数据类型的table(matrix),不同类型的table,以及从DB文件取数据、数据序列化、压缩等。
在这些定制的数据源上,Intel DAAL使用自己底层的CPU进行硬件加速!下面摘自其官方:
Intel DAAL addresses all stages of the data analytics pipeline: preprocessing, transformation, analysis, modeling, validation, and decision-making.
Intel DAAL is developed by the same team as the Intel® Math Kernel Library (Intel® MKL)—the leading math library in the world. This team works closely with Intel® processor architects to squeeze performance from Intel processor-based systems.
Specs at a Glance
Processors | Intel Atom®, Intel Core™, Intel® Xeon®, and Intel® Xeon Phi™ processors and compatible processors |
Languages | Python*, C++, Java* |
Development Tools and Environments |
Microsoft Visual Studio* (Windows*) Eclipse* and CDT* (Linux*) |
Operating Systems | Use the same API for application development on multiple operating systems: Windows, Linux, and macOS* |
统计特征的计算加速例子:
# file: low_order_moms_dense_batch.py #=============================================================================== # Copyright 2014-2018 Intel Corporation. # # This software and the related documents are Intel copyrighted materials, and # your use of them is governed by the express license under which they were # provided to you (License). Unless the License provides otherwise, you may not # use, modify, copy, publish, distribute, disclose or transmit this software or # the related documents without Intel's prior written permission. # # This software and the related documents are provided as is, with no express # or implied warranties, other than those that are expressly stated in the # License. #=============================================================================== ## <a name="DAAL-EXAMPLE-PY-LOW_ORDER_MOMENTS_DENSE_BATCH"></a> ## \example low_order_moms_dense_batch.py import os import sys from daal.algorithms import low_order_moments from daal.data_management import FileDataSource, DataSourceIface utils_folder = os.path.realpath(os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) if utils_folder not in sys.path: sys.path.insert(0, utils_folder) from utils import printNumericTable DAAL_PREFIX = os.path.join('..', 'data') # Input data set parameters dataFileName = os.path.join(DAAL_PREFIX, 'batch', 'covcormoments_dense.csv') def printResults(res): printNumericTable(res.get(low_order_moments.minimum), "Minimum:") printNumericTable(res.get(low_order_moments.maximum), "Maximum:") printNumericTable(res.get(low_order_moments.sum), "Sum:") printNumericTable(res.get(low_order_moments.sumSquares), "Sum of squares:") printNumericTable(res.get(low_order_moments.sumSquaresCentered), "Sum of squared difference from the means:") printNumericTable(res.get(low_order_moments.mean), "Mean:") printNumericTable(res.get(low_order_moments.secondOrderRawMoment), "Second order raw moment:") printNumericTable(res.get(low_order_moments.variance), "Variance:") printNumericTable(res.get(low_order_moments.standardDeviation), "Standard deviation:") printNumericTable(res.get(low_order_moments.variation), "Variation:") if __name__ == "__main__": # Initialize FileDataSource to retrieve input data from .csv file dataSource = FileDataSource( dataFileName, DataSourceIface.doAllocateNumericTable, DataSourceIface.doDictionaryFromContext ) # Retrieve the data from input file dataSource.loadDataBlock() # Create algorithm for computing low order moments in batch processing mode algorithm = low_order_moments.Batch() # Set input arguments of the algorithm algorithm.input.set(low_order_moments.data, dataSource.getNumericTable()) # Get computed low order moments res = algorithm.compute() printResults(res)
相关文章
- vue 子组件调用父组件方法传参,父组件调用也传参_面试题vue组件封装思路
- fpga学习——zynq图像处理中的DVP流接口封装
- 「Python」面向对象封装案例1——小夏爱跑步、案例扩展
- vue模态框组件封装
- ON1 NoNoise AI 2023 for mac(ai摄影降噪软件)中文版
- 新思科技DSO.ai助力客户完成100次流片,引领AI在芯片设计中的规模化应用
- 【Android RTMP】RTMPDump 封装 RTMPPacket 数据包 ( 封装 SPS / PPS 数据包 )
- 新思科技发布业界首款全栈式AI驱动型EDA解决方案Synopsys.ai
- 【C++】list迭代器的深度剖析及模拟实现(感受类封装,类和对象的思想)
- 基于Redis+Lua脚本实现分布式限流组件封装的方法
- MongoDB封装:极致性能与无忧畅通(mongodb 封装)
- 使用C语言封装的MySQL操作类让数据库开发更简单(c mysql操作封装类)
- MySQL中AI是什么意思(mysql中ai表示)
- 智能科技推动数据库时代的到来AI与MySQL的协同发展(ai mysql)
- Oracle AI 智能时代的一抹点缀(oracle ai)
- 亚马逊悄然收购AI安全公司harvest.ai,增强云服务安全
- Jquery作者JohnResig自己封装的javascript常用函数
- javascript面向对象全新理练之数据的封装
- jquery封装的对话框简单实现
- c#使用简单工厂模式实现生成html文件的封装类分享
- Objective-C封装字符串存储操作示例