TBE自定义算子有两种:
- DSL(Domain-Specific Language)
- TIK(Tensor Iterator Kernel)
其中DSL方式只需要定义算子的计算表达,不用考虑如何调度;
而TIK方式就需要同时定义计算与调度两方面。
所以DSL上手快,但性能可能不理想,适合初学者以及快速验证等场景;
TIK开发则需要了解SOC结构与特性,可以开发出更高性能的算子,适合对性能有一定要求的场景。
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
600+累计阅读
651平均单平台
已同步平台
优快云
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄20年
TBE自定义算子有两种:
其中DSL方式只需要定义算子的计算表达,不用考虑如何调度;
而TIK方式就需要同时定义计算与调度两方面。
所以DSL上手快,但性能可能不理想,适合初学者以及快速验证等场景;
TIK开发则需要了解SOC结构与特性,可以开发出更高性能的算子,适合对性能有一定要求的场景。
手把手教你用微信小程序实现智能硬件音视频通话(含Linux/RTOS适配)
本文详细介绍了如何利用微信小程序硬件框架(WMPF)和音视频SDK,在智能硬件(包括Linux与RTOS设备)上实现音视频通话功能。文章从架构设计、设备端SDK集成、小程序VOIP插件开发到跨平台调试与性能优化,提供了全链路实战指南,帮助开发者打通微信小程序与嵌入式设备间的实时音视频通信。
使用更新命令yum时出现故障的解决方法
近日在运行系统更新命令yum update时候出现了如下错误提示:Component: pirutSummary: TBe8ae967a sqlitesack.py:94:_read_db_obj:TypeError: unsubscriptable object Traceback (most recent call last): File “/usr/sbin/pup”, line 4...
MS1030超声波流量计电路实战:如何用15ps精度优化水表设计(附配置代码)
本文深入探讨了如何利用MS1030超声波流量计芯片实现15ps高精度测量,以优化水表设计。文章从系统误差分配出发,详细解析了硬件电路设计要点、SPI通信配置及核心优化技巧,如利用可编程偏置电压和8回波累加功能来提升抗干扰能力与测量稳定性,并附有实用的配置代码示例。
昇腾CANN算子开发揭秘
本文介绍了CANN自定义算子开发的几种开发方式和算子的编译运行流程。然后以开发一个DSL Add算子为例,讲解算子开发的基本流程。
《阵列信号处理及MATLAB实现》阵列响应矩阵(均匀线阵、均匀圆阵、L型阵列、平面阵列和任意阵列)
《阵列信号处理及MATLAB实现》内容总结,如需阅读更详细内容请购买正版书籍。
飞牛NAS一键部署小雅Emby全家桶:解锁海量影音资源与智能刮削
本文详细介绍了如何在飞牛NAS上通过Docker一键部署小雅Emby全家桶,完美解决传统WebDAV挂载无法刮削元数据的问题。该方案整合了小雅Alist海量影音资源与Emby媒体服务器,通过预下载超百GB元数据包,自动实现海报、简介等信息的完美匹配,打造出精美的个人影音库。部署过程需准备阿里云盘令牌与充足存储空间,并详解了从环境配置、镜像拉取到最终验证的完整步骤及优化技巧。
Low-Light Image and Video Enhancement Using Deep Learning: A Survey(论文阅读)
Low-Light Image and Video Enhancement Using Deep Learning: A Survey
小程序 video 控制器外观调整_Kessil 360X Tuna Sun无线控制器使用分享
之前分享了Kessil 360X Tuna Sun开箱记录,时间关系,没来得及使用WiFi Dongle无线控制器。昨晚抽空实操了一下,做个操作记录,希望对大家有参考Kessil无线模块操作指南官方视频英文教程配中文字幕,非常详尽语速较快,重点位置可以暂停操作点击边框调出视频工具条1、拆包取控制器,保存二维码Kessil WiFi Dongle包装打开包装就能看到Kessil无线控制模...
accelerator php版本,解决因为centos PHP版本过旧升级,造成的eAccelerator错误
近日在运行系统更新命令yum update时候出现了如下错误提示:Component: pirutSummary: TBe8ae967a sqlitesack.py:94:_read_db_obj:TypeError: unsubscriptable objectTraceback (most recent call last):File “/usr/sbin/pup”, line 407, in...
C++常见面试题总结
C++常见面试题总结
【STM32单片机】RS485通信—基于STM32G474芯片
做项目需要用485通信来控制Go电机参考资料:【【STM32F103C8T6系列】10. 实验例程——485(USART串口)通讯实验】 https://www.bilibili.com/video/BV19w411r7ka/?PDF: STM32G474 开发指南 正点原子 DMG474 开发板教程 第28章485只是物理层,代码逻辑还是UART串口通信,相当于是电路有RS485转换芯片,所以还是用UART串口通信方式。
Ascend C与CANN TBE算子开发对比 - 融合算子的两种实现路径
本文深入探讨了昇腾AI处理器上融合算子开发的两种核心技术路径:AscendC与TBE(TensorBoostEngine)。通过真实项目实战经验,全面分析了两种开发范式的架构设计理念、性能特性差异及适用场景。文章包含完整的融合算子实现代码、性能对比数据和企业级优化实践,为开发者提供选型指南。关键发现:TBE适合快速原型验证,开发效率高;AscendC则能实现极致性能优化,适合核心算子开发。通过Matmul+LeakyReLU等案例展示了两种实现方式,并提供了性能对比数据(AscendC性能提升达49.6%)
基于STM32L4XX、HAL库的ICP-10111压力传感器驱动程序设计
define ICP10111_CMD_MEAS_ULN 0x7866 // 超低噪声模式。#define ICP10111_CMD_MEAS_LP 0x609C // 低功耗模式。#define ICP10111_CMD_MEAS_LN 0x70DF // 低噪声模式。#define ICP10111_CMD_MEAS_N 0x6825 // 正常模式。ICP10111_MODE_LN, // 低噪声。// 等待测量完成(根据模式不同等待时间不同)
从“算子不支持”到“NPU高效执行”:CANN 8.0 TBE 自定义算子落地实践
摘要: 本文针对AI模型部署中自定义算子支持不足的痛点,提出基于华为CANN 8.0和TBE工具链的解决方案。通过昇腾NPU 910B硬件平台,演示了从自定义算子开发到高效NPU执行的全流程。文章首先复现了MindSpore框架因缺少算子实现而报错的问题场景,随后详细介绍了利用TBE的Python-DSL简化开发、CANN平台实现软硬协同优化的技术方案。该实践显著降低了自定义算子开发门槛,充分发挥NPU硬件算力,为AI产业落地提供了关键技术支持,特别适用于自动驾驶、工业质检等对实时性要求高的场景。
锂电池充电器电路设计 里面有电路
锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
CANN算子开发入门:基于TBE API编写第一个自定义算子
在CANN异构计算架构中,除了系统内置算子,开发者常需根据特定业务场景开发自定义算子。而TBE(Tensor Boost Engine)API作为CANN算子开发的核心工具,提供了从张量操作到硬件调度的完整能力。本文将以元素级乘法算子(Mul)为例,详细讲解基于TBE API开发自定义算子的全流程,帮助读者迈出算子开发的第一步。
TMS_WebGMaps_1.9.8.0_Full_Source
TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder
化繁为简,点石成金:实战CANN TBE构建Transformer高性能融合注意力算子
在之前的文章中,我们聚焦于顶层的“AI框架”如何通过CANN顺利运行在底层的“Ascend IP”上。而今天,我们的征途将深入这张图的腹地——直抵**CANN的核心**。我们将不再仅仅是应用CANN的“图引擎(GE)”来执行整个模型,而是要亲自扮演“算子开发者”的角色,利用“TBE(Tensor Boost Engine)”**为昇腾硬件量身定制一个全新的、不存在于****标准库****中的高性能“融合算子”,并用**“AscendCL”对其进行精准调用。这,是一场真正深入到异构计算架构灵魂的探索之旅。
文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况
主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。
理论+实践,揭秘昇腾CANN算子开发
本文介绍了CANN自定义算子开发的几种开发方式和算子的编译运行流程。然后以开发一个DSL Add算子为例,讲解算子开发的基本流程。
【CANN文档速递04期】揭秘昇腾CANN算子开发
本期我们主要带您了解CANN自定义算子的类型,编译、运行逻辑架构,以及算子的开发流程等,让您对CANN算子有宏观的了解。
基于CANN框架的算子开发:释放AI计算潜能的核心引擎
昇腾AI处理器通过CANN软件栈支持自定义算子开发,满足前沿AI模型需求。CANN提供TBE和Ascend C两条开发路径:TBE通过数学解构、高阶封装、智能调度和编译部署四环节实现高效开发;Ascend C则提供硬件级控制,实现极致性能优化。以Softmax算子为例,TBE DSL通过数值稳定性优化和向量化加速,实现5.1倍性能提升。CANN的算子开发能力是连接AI应用与昇腾硬件的关键桥梁,能充分释放硬件潜能。
CANN算子-基于 TBE DSL 的自定义算子开发全流程解析(训练营深度实践篇)
在昇腾生态不断扩大、多样化 AI 工作负载日益增长的今天,如何高效、安全、可控地构建自定义算子成为许多开发者的核心诉求。华为 CANN(Compute Architecture for Neural Networks)提供的 TBE(Tensor Boost Engine)算子开发框架,不仅包含传统 Schedule 写法,还提供了一套更易用、更工程化的 DSL(Domain-Specific Language)开发模式,将算子开发复杂度大幅降低。
【昇腾AI加速秘籍】:Java如何调用TBE算子实现百倍推理提速?
掌握Java昇腾AI处理器开发新方法,轻松实现推理性能百倍提升。通过Java调用TBE自定义算子,结合昇腾AI处理器高效执行深度学习推理任务,适用于图像识别、自然语言处理等场景。详解接口调用与性能优化技巧,值得收藏。
从Abs算子到复杂模型:昇腾CANN算子开发的全栈视角
本文深入探讨了昇腾CANN算子开发的全栈技术,从基础的Abs算子实现到复杂模型的优化与部署。通过昇腾NPU硬件加速和CANN架构的全流程实践,开发者可以显著提升AI模型的性能落地效率。文章详细介绍了算子开发环境搭建、优化策略及真实案例,为AI计算领域提供了实用的技术指南。
华为Ascend昇腾CANN详细教程(一)
华为Ascend昇腾CANN详细教程(一)
昇腾BN算子开发实战:CANN高效实现技巧
本文详细介绍了在华为昇腾CANN架构下开发高性能BatchNormalization算子的实战指南。首先解析了BN算子的数学原理及CANN开发的核心挑战,包括数据复用效率、计算并行度和阶段适配性。接着详细说明了开发环境搭建步骤和算子实现流程,涵盖算子原型定义、TBE代码实现及编译部署。重点阐述了通过数据格式优化、计算融合和缓存预取三大优化策略,使算子吞吐量提升1.5倍以上,延迟降低60%。最后总结了常见问题调试技巧,并展望了多精度计算、动态形状支持等未来优化方向。该指南为开发者提供了从理论到实践的完整BN算
CANN社区Equal算子开发任务
- **技术标签**:算子开发 - **适配硬件**:Atlas A2 训练系列产品/Atlas A3 系列产品 - **开源仓地址**:[https://link.gitcode.com/i/e5d3c7f0b42d12aa6030de60db207519](https://link.gitcode.com/i/e5d3c7f0b42d12aa6030de60db207519) - **C
CANN社区NllLoss算子任务书
- **技术标签**:算子开发 - **适配硬件**:Atlas A2 训练系列产品/Atlas A3 系列产品 - **开源仓地址**:https://gitcode.com/cann/ops-nn - **CANN 版本**:算子开源仓指定版本 - **开发语言**:Ascend C ## 任务概述 参考昇腾版本内置aclnnNLLLoss算子的 TBE 实现,在昇腾 NPU 上基于 As
8万+
1329
6328
2万+
793

被折叠的 条评论
为什么被折叠?



