Comments (4)
思考,可以这么来:
- 准备多个 host buffers,用于 swap;
- 使用 stream 派发 host function;
- 派发的 host function 中进行打印和 swap buffer。
from luisacompute.
callback里能套callback吗
例如:
def f():
def g():
...
// add some command
stream.add_callback(g)
stream.add_callback(f)
试了下这么搞会卡住
from luisacompute.
No good. In principle, any device-related function is not allowed in the callback, as it is called from the dispatch thread...
from luisacompute.
Please refer to the C++ implementation.
from luisacompute.
Related Issues (20)
- Open Shading Language to LuisaCompute AST translator HOT 1
- CPU backend shared memory emulation via LLVM coroutine
- Build (linking) error on macOS Ventura 13.5.2 Apple M2 HOT 10
- Support offset and size in texture copy commands
- test_denoiser crash with DX backend HOT 2
- Vulkan / HIP backend(s) HOT 5
- Minimal cross platform example for blit to screen HOT 2
- Not building with msc HOT 9
- Export `luisa-config.h` for other build systems than CMake
- Better error handling when RTX support is not supported
- Simple lambda causes LESBAR HOT 2
- default variable initialization codegen wrong in loop scope HOT 1
- Motion Blur Support HOT 1
- ImageView.copy_from() crashes with specific resolution HOT 1
- Should TLAS accept primitives only? HOT 1
- Incorrect Buffer copy_from and copy_to on CPU/DX and possibly Metal backends
- 当采用cmake作为构建工具,且依赖的 “Windows 10 SDK” 为 “10.0.19041.0” 时,关于DirectML的部分会编译失败 HOT 2
- 当采用xmake构建,启用cpu后端来运行时,会出现 'swapchain context is not initialized' 错误 HOT 2
- Windows build fails with return type inference failure. HOT 4
- Support for Sphere Primitives in Ray Tracing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luisacompute.