-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[GPU] XAttention as a preview feature #32064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 43 commits
e030c80
435a7ac
8947906
83dba29
2743aab
65b9cc7
c4a1659
62a222f
ac882ab
0621e4b
98a4ecd
5af3330
4f9ed28
d35f4fb
4e25a4a
c3c87b7
76685f0
c5bdcf9
95a2da1
36bee72
4fa97be
55ba7c3
a06adef
4b391be
f2f2126
89c8577
024b71a
033304f
a6e72d0
f7ddc68
29cdabb
5048081
0c8c029
6fbf07b
13b1122
24d6b80
326fc4d
508fab3
73669d3
45bedf3
b7a9a8b
703dca6
f9f58be
f7fa94f
3afbdb5
2c37d0d
cae516a
010b6e7
808a789
22f0459
780f55a
d21c4f6
6b9b4c2
eb9765e
1418daa
21c3193
8a7a380
472f774
1fdcd3c
a62fd1b
52aad92
3da8a34
2dd7a81
bbf17ed
147063f
c02fb34
314bd71
fdbba78
2ade1e1
f402a14
342ae59
8e8b74c
4a82167
6f7dd8d
326ee44
cfa1f3a
f795152
35267d3
2dfbb19
cca1528
618e575
b2afd6e
522a503
3e527be
1e243fc
b45062c
50628c5
1073002
5eff824
d164bba
853b562
0870cbb
c2bde5b
554ebf4
e794f5b
5ff7d32
26c4f2f
1ec3dfd
a6e4bbb
bdf2e89
8ba831a
5201cdf
7825960
d870554
14e57f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -250,7 +250,7 @@ void log_memory_to_file(memory::ptr mem, layout data_layout, stream& stream, std | |
| dump<int8_t>(actual_mem, stream, file_stream, dump_raw); | ||
| else if (mem_dt == cldnn::data_types::u8) | ||
| dump<uint8_t>(actual_mem, stream, file_stream, dump_raw); | ||
| else if (mem_dt == cldnn::data_types::u8) | ||
| else if (mem_dt == cldnn::data_types::boolean) | ||
| dump<uint8_t>(actual_mem, stream, file_stream, dump_raw); | ||
| else if (mem_dt == cldnn::data_types::i4 || mem_dt == cldnn::data_types::u4) | ||
| dump_i4u4(mem_dt, actual_mem, stream, file_stream, dump_raw); | ||
|
|
@@ -558,6 +558,33 @@ NodeDebugHelper::~NodeDebugHelper() { | |
| log_memory_to_file(output_mem, output_layout, m_stream, filename, dump_raw); | ||
| } | ||
| } | ||
|
|
||
| for (size_t i = 0; i < m_inst.inputs_memory_count(); i++) { | ||
|
||
| std::string name = get_file_prefix() + "_updated_src_" + std::to_string(i); | ||
| auto output_mem = m_inst.input_memory_ptr(i); | ||
| if (output_mem == nullptr) { | ||
| GPU_DEBUG_COUT << " updated_input_mem is nullptr. Nothing to dump." << std::endl; | ||
| continue; | ||
| } | ||
|
|
||
| auto& output_layout = m_inst.get_input_layout(i); | ||
| if (config.get_dump_tensors_format() == ov::intel_gpu::DumpFormat::binary) { | ||
| // Binary dump : raw | ||
| auto filename = get_file_path_for_binary_dump(output_layout, name, config.get_dump_tensors_path()); | ||
|
|
||
| mem_lock<char, mem_lock_type::read> lock(output_mem, m_stream); | ||
| ov::util::save_binary(filename, lock.data(), output_mem->size()); | ||
| GPU_DEBUG_COUT << " Dump layer dst : " << layer_name << " to " << filename << std::endl; | ||
| debug_str_for_bin_load += (filename + ","); | ||
| } else { | ||
| const bool dump_raw = config.get_dump_tensors_format() == ov::intel_gpu::DumpFormat::text_raw; | ||
| GPU_DEBUG_COUT << " Dump " << (dump_raw ? "raw " : "") << name << std::endl; | ||
| auto filename = config.get_dump_tensors_path() + get_name_for_dump(name) + ".txt"; | ||
| // Text dump | ||
| log_memory_to_file(output_mem, output_layout, m_stream, filename, dump_raw); | ||
| } | ||
| } | ||
|
|
||
| if (config.get_dump_tensors_format() == ov::intel_gpu::DumpFormat::binary && m_inst.is_input()) { | ||
| debug_str_for_bin_load[debug_str_for_bin_load.size()-1] = '\"'; | ||
| GPU_DEBUG_COUT << debug_str_for_bin_load << std::endl;; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.