Skip to content

Commit 2d48cdc

Browse files
SS-JIAfacebook-github-bot
authored andcommitted
Add support for buffer storage tensors (#3684)
Summary: Pull Request resolved: #3684 ## Context Add support for tensors that use buffer storage, in preparation for quantization support. For more context, the initial versions of quantized operators will target buffer based tensors. This is because the primary use-case is LLMs, which may contain tensors that may exceed the texture limits. Reviewed By: yipjustin Differential Revision: D57577019 fbshipit-source-id: 370184fa05e21b4db18a43bdfd2d13a6ee4bf49e
1 parent ce751fc commit 2d48cdc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1281
-509
lines changed

backends/vulkan/runtime/api/Context.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,5 +250,10 @@ ParamsBindList::ParamsBindList(
250250
std::copy(init_list.begin(), init_list.end(), bind_infos.begin());
251251
}
252252

253+
void ParamsBindList::append(const ParamsBindList& other) {
254+
bind_infos.insert(
255+
bind_infos.end(), other.bind_infos.begin(), other.bind_infos.end());
256+
}
257+
253258
} // namespace api
254259
} // namespace vkcompute

backends/vulkan/runtime/api/Context.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ struct ParamsBindList final {
270270
std::vector<BufferBindInfo> bind_infos;
271271

272272
ParamsBindList(std::initializer_list<const BufferBindInfo> init_list);
273+
274+
void append(const ParamsBindList& other);
273275
};
274276

275277
class StorageBuffer final {

0 commit comments

Comments
 (0)