Taichi(太极)v1.6.0 发布
Taichi(太极)v1.6.0 现已发布。Taichi Lang 是一种开源的、命令式的、用于高性能数值计算的并行编程语言。它被嵌入到 Python 中,并使用即时编译器 (JIT) 框架,例如 LLVM,将计算密集型的 Python 代码 offload 到本地 GPU 或 CPU 指令中。
具体更新内容如下:
弃用通知
- 删除了一些很久以前就弃用的 API。见下表:
Removed API | Replace with |
---|---|
Using atomic operations like a.atomic_add(b) | ti.atomic_add(a, b) or a += b |
Using is and is not inside Taichi kernel and Taichi function | Not supported |
Ndrange for loop with the number of the loop variables not equal to the dimension of the ndrange | Not supported |
ti.ui.make_camera() | ti.ui.Camera() |
ti.ui.Window.write_image() | ti.ui.Window.save_image() |
ti.SOA | ti.Layout.SOA |
ti.AOS | ti.Layout.AOS |
ti.print_profile_info | ti.profiler.print_scoped_profiler_info |
ti.clear_profile_info | ti.profiler.clear_scoped_profiler_info |
ti.print_memory_profile_info | ti.profiler.print_memory_profiler_info |
ti.CuptiMetric | ti.profiler.CuptiMetric |
ti.get_predefined_cupti_metrics | ti.profiler.get_predefined_cupti_metrics |
ti.print_kernel_profile_info | ti.profiler.print_kernel_profiler_info |
ti.query_kernel_profile_info | ti.profiler.query_kernel_profiler_info |
ti.clear_kernel_profile_info | ti.profiler.clear_kernel_profiler_info |
ti.kernel_profiler_total_time | ti.profiler.get_kernel_profiler_total_time |
ti.set_kernel_profiler_toolkit | ti.profiler.set_kernel_profiler_toolkit |
ti.set_kernel_profile_metrics | ti.profiler.set_kernel_profiler_metrics |
ti.collect_kernel_profile_metrics | ti.profiler.collect_kernel_profiler_metrics |
ti.VideoManager | ti.tools.VideoManager |
ti.PLYWriter | ti.tools.PLYWriter |
ti.imread | ti.tools.imread |
ti.imresize | ti.tools.imresize |
ti.imshow | ti.tools.imshow |
ti.imwrite | ti.tools.imwrite |
ti.ext_arr | ti.types.ndarray |
ti.any_arr | ti.types.ndarray |
ti.Tape | ti.ad.Tape |
ti.clear_all_gradients | ti.ad.clear_all_gradients |
ti.linalg.sparse_matrix_builder | ti.types.sparse_matrix_builder |
- 不再弃用 Taichi 内核中的内置 min/max 函数。
- 弃用了计算图参数声明中的一些参数,它们将在 v1.7.0 中删除。包括:
- scalar 和 ndarray 的
element_shape
参数 - texture 的
shape
、channel_format
和num_channels
参数
- scalar 和 ndarray 的
cc
后端将在下一个版本中删除 (v1.7.0
)
新功能
Struct arguments
你现在可以在所有后端中使用结构参数。结构可以嵌套,并且可以包含矩阵和向量。示例:
transform_type = ti.types.struct(R=ti.math.mat3, T=ti.math.vec3) pos_type = ti.types.struct(x=ti.math.vec3, trans=transform_type) @ti.kernel def kernel_with_nested_struct_arg(p: pos_type) -> ti.math.vec3: return p.trans.R @ p.x + p.trans.T trans = transform_type(ti.math.mat3(1), [1, 1, 1]) p = pos_type(x=[1, 1, 1], trans=trans) print(kernel_with_nested_struct_arg(p)) # [4., 4., 4.]
Ndarray
- 在 python scope 内支持 0 dim ndarray 读写
- 修复了从 Python scope 写入 ndarray 时的一个错误
Improvements
- 支持 autodiff 中的 rsqrt operator
- 为 CPU 后端添加了 assembly printer
- 支持超过 48KiB 的 CUDA shared array 分配
Performance
- 改进了 CPU 后端的矢量化支持,显着提高了特定应用程序的性能
New Examples
- 2D 欧拉流体模拟示例
Misc
- Python 3.11 支持
ti.frexp
在 CUDA、Vulkan、Metal、OpenGL 后端都得到了支持。ti.math.popcnt
intrinsic- 修复了 SNodeTree destruction 过程中的内存泄漏问题
- 为 ti.Field finalization 添加验证和改进的错误报告
- 修复了 C-API 中 Cuda 后端的内存泄漏问题
- 增加了对使用 str.format() 和 f-strings 的格式化打印的支持
- 将 Python 代码格式化程序从
yapf
更改为black
Developer Experience
- 用于准备构建和测试环境的 build.py 脚本
更多详情可查看发布说明。

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
Ruby 3.3.0 发布首个预览版
Ruby 3.3.0-preview1 已发布,作为 3.3 的第一个预览版。Ruby 3.3 最重大的改动是添加了一个名为 RJIT 的新纯 Ruby JIT 编译器,使用 Lrama 作为解析器生成器,并带来许多性能改进。 RJIT Ruby 3.3.0-preview1 引入纯 Ruby JIT 编译器 RJIT 替换了 MJIT。与 MJIT 不同,RJIT在运行时不需要 C 编译器。 有关 RJIT 的详细介绍,可查看此前的报道:《Ruby 引入新 JIT 编译器 RJIT,替代 MJIT》。 但要注意:RJIT 仅支持 Unix 平台上的 x86_64 架构。而且目前 RJIT 仅用于实验目的。应该在生产中继续使用 YJIT。 使用 Lrama 而不是 Bison 用Lrama LALR 解析器生成器功能替换 Bison #19637 YJIT 性能改进 改进了 Splat 和 rest 参数支持。 为虚拟机的堆栈操作分配寄存器。 编译更多带有可选参数的调用。 Integer#!=,String#!=,Kernel#block_given?,Kernel#is_a?,Ker...
- 下一篇
🎉国产开源的Servlet容器:smart-servlet v0.3发布
1、smart-servlet 简介 smart-servlet是目前 Gitee、Github 平台上首款,也是唯一款全栈核心技术自研的国产开源的Servlet容器项目。 产品特色 国产血统:核心技术 100% 全栈自研。 性能优越:搭载最新版通信微内核 smart-socket。 安全可靠:严格遵循协议规范;支持加密传输方式。 简洁易用:支持 War 包、springboot、maven-plugin等多种运行模式,使用体验100%兼容 Tomcat。 模块介绍 模块 说明 代码量 servlet-core 实现了Servlet规范的核心模块 17000+ smart-servlet-maven-plugin 类似 tomcat-maven-plugin 的 maven 插件 100+ spring-boot-stater 适配 springboot 的启动器,类似:spring-boot-starter-tomcat 100+ 2、 版本更新 本次更新内容: 实现HttpSessionAttributeListener规范 实现ServletRequestAttributeLis...
相关文章
文章评论
共有0条评论来说两句吧...
文章二维码
点击排行
推荐阅读
最新文章
- Docker安装Oracle12C,快速搭建Oracle学习环境
- Docker快速安装Oracle11G,搭建oracle11g学习环境
- CentOS7安装Docker,走上虚拟化容器引擎之路
- SpringBoot2全家桶,快速入门学习开发网站教程
- CentOS7设置SWAP分区,小内存服务器的救世主
- CentOS7,CentOS8安装Elasticsearch6.8.6
- Hadoop3单机部署,实现最简伪集群
- SpringBoot2更换Tomcat为Jetty,小型站点的福音
- Docker使用Oracle官方镜像安装(12C,18C,19C)
- SpringBoot2配置默认Tomcat设置,开启更多高级功能