更新
This commit is contained in:
@@ -1,34 +1,11 @@
|
||||
# 应用方式
|
||||
|
||||
本包是 Observation P0/P1 基础重构的累计整体包,不依赖 git。
|
||||
|
||||
## 当前仓库:141 + `Aethera_observation_text_guardrail_0477a7e_20260905_153807_CST.zip`
|
||||
|
||||
也就是你当前 `46962440a22b50c9cbda929cdb549f564e429efa` 对应的状态,直接执行:
|
||||
|
||||
# Aethera P0/P1 follow-up
|
||||
基线:142 提交 `46962440a22b50c9cbda929cdb549f564e429efa` 已叠加 `Aethera_observation_p0_p1_refactor_46962440_20260905_164237_CST.zip`。
|
||||
从本包目录执行:
|
||||
```text
|
||||
python upgrade_from_text_guardrail.py <Aethera 仓库根目录>
|
||||
cmake -DAETHERA_ROOT=D:/path/to/Aethera -P apply.cmake
|
||||
```
|
||||
|
||||
脚本先精确撤销上一累计包对四组业务源码的旧接入,再立即应用本包的新实现。这个撤销过程只属于离线应用工具,最终源码不保留旧运行时实现或兼容层。
|
||||
|
||||
## 干净的第 141 次 `0477a7e1b66481b53c44fc537328a23670054180`
|
||||
|
||||
直接执行:
|
||||
|
||||
```text
|
||||
python apply_all.py <Aethera 仓库根目录>
|
||||
```
|
||||
|
||||
## 本阶段结果
|
||||
|
||||
- 业务源码不再直接 include `observation/*`;Taskflow、Frame Policy、Render3D/GPU Completion 只经过各模块 `Trace_Adapter.hpp` 接入。
|
||||
- `TRACY_ENABLE` 关闭时不创建 Observation Context、synthetic ID、状态 mirror 或 Frame 汇总。
|
||||
- Tracy 默认模式与 `TRACY_ON_DEMAND` 使用统一 `trace_capture_active()` 语义。
|
||||
- Taskflow 每任务附加文本只剩 `frame/generation`,并使用 96-byte sink。
|
||||
- 删除 `Frame_Attention`、`Frame_Attention_Index`、`frame_policy_context`、Vulkan/GPU Completion/Frame Policy 状态 mirror。
|
||||
- Frame Policy 直接使用现有双缓冲 Model 正在发布的 State,不复制第二份状态。
|
||||
- Frame timing 不再重复发送完整 Message;Frame Policy 改为带实例 identity 的单条 State Message;Vulkan GPU 趋势只保留 Render/Total Plot。
|
||||
- 删除 header-local synthetic ID/counter/state,避免不同 DLL 各自维护所谓“全局状态”。
|
||||
|
||||
详细设计边界见 `kernel/kernel/include/observation/design.md`,P0/P1 对照见 `P0_P1_FIXES.md`。
|
||||
修复内容:
|
||||
- Immediate Vulkan completion 不再依赖 `timing != nullptr`,`timing` 只控制诊断返回值。
|
||||
- 恢复 frame-bound `gpu_submitted` 生命周期事件,与 `gpu_completed` 使用同一确定性 submission correlation。
|
||||
- 不恢复 Vulkan mirror、全局 Observation state 或额外 snapshot。
|
||||
本包不包含 Python 文件。
|
||||
|
||||
@@ -55,6 +55,13 @@ decltype(auto) trace_vulkan_submit(Submit&& submit) {
|
||||
AETHERA_TRACE_ZONE("Vulkan.Submit");
|
||||
return std::invoke(std::forward<Submit>(submit));
|
||||
}
|
||||
inline void trace_vulkan_submitted(const Vulkan_Submission_Context& submission) noexcept {
|
||||
#ifdef TRACY_ENABLE
|
||||
AETHERA_TRACE_MESSAGE_TAGS(submission);
|
||||
#else
|
||||
static_cast<void>(submission);
|
||||
#endif
|
||||
}
|
||||
inline void trace_vulkan_completed(const Vulkan_Submission_Context& submission, std::uint64_t latency_ns) noexcept {
|
||||
#ifdef TRACY_ENABLE
|
||||
const auto value = make_vulkan_completion_context(submission, latency_ns);
|
||||
@@ -81,6 +88,16 @@ inline void trace_vulkan_gpu_timing(const Vulkan_Submission_Context& submission,
|
||||
#endif
|
||||
}
|
||||
template <class Sink>
|
||||
void trace_serialize(Sink& sink, const Vulkan_Submission_Context& value) {
|
||||
sink.field("event", "vulkan_submit");
|
||||
trace_serialize(sink, value.context);
|
||||
if (value.frame_bound) {
|
||||
sink.field("frame", value.frame);
|
||||
sink.field("generation", value.generation);
|
||||
}
|
||||
if (value.queue != 0) sink.field("queue", value.queue);
|
||||
}
|
||||
template <class Sink>
|
||||
void trace_serialize(Sink& sink, const Vulkan_GPU_Timing_Context& value) {
|
||||
sink.field("event", "vulkan_gpu_timing");
|
||||
trace_serialize(sink, value.context);
|
||||
|
||||
@@ -41,6 +41,10 @@ void frame_marker(const Frame_Identity& identity, const Marker_Array& markers, M
|
||||
if (begin_ns == 0 || end_ns == 0 || end_ns < begin_ns) return std::uint64_t{};
|
||||
return end_ns - begin_ns;
|
||||
};
|
||||
if (marker == Marker::gpu_submitted) {
|
||||
observation::trace_vulkan_submitted(observation::make_vulkan_submission_context(frame));
|
||||
return;
|
||||
}
|
||||
if (marker == Marker::gpu_completed) {
|
||||
observation::trace_vulkan_completed(observation::make_vulkan_submission_context(frame), marker_span(Marker::gpu_submitted, Marker::gpu_completed));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user