Skip to content

Commit

Permalink
get rid of external dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekt3421 committed Oct 10, 2024
1 parent a07b527 commit 9a8f8ee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ jobs:
- name: Simple test (static)
if: ${{ matrix.compiler-available && matrix.android-abi == '' }}
run: ${{ env.testbindir }}/simple_test_static${{ env.exe-ext }}
- name: Simple test (static)
if: ${{ matrix.compiler-available && matrix.android-abi == '' }}
run: ${{ env.testbindir }}/simple_test_concurrent_print 1500 ${{ env.exe-ext }}
- name: Simple test
if: ${{ matrix.compiler-available && matrix.android-abi == '' }}
run: ${{ env.testbindir }}/simple_test${{ env.exe-ext }}
Expand Down
6 changes: 1 addition & 5 deletions src/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1041,11 +1041,7 @@ cvk_command_kernel::build_batchable_inner(cvk_command_buffer& command_buffer) {
// Setup printf buffer descriptor if needed
if (m_kernel->program()->uses_printf()) {
// Create and initialize the printf buffer
auto buffer = get_or_create_printf_buffer();
auto err = reset_printf_buffer();
if (err != CL_SUCCESS) {
return err;
}
auto buffer = create_printf_buffer();

if (m_kernel->program()->printf_buffer_info().type ==
module_buffer_type::storage_buffer) {
Expand Down
11 changes: 4 additions & 7 deletions src/queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,25 +773,22 @@ struct cvk_command_kernel final : public cvk_command_batchable {
return argvals->memory_objects();
}

cvk_buffer* get_or_create_printf_buffer() {
cvk_buffer* create_printf_buffer() {
if (!m_printf_buffer) {
cl_int status;
m_printf_buffer = cvk_buffer::create(
m_context, 0, m_context->get_printf_buffersize(), nullptr,
&status);
CVK_ASSERT(status == CL_SUCCESS);
}
return m_printf_buffer.get();
}

cl_int reset_printf_buffer() {
if (m_printf_buffer && m_printf_buffer->map_write_only()) {
memset(m_printf_buffer->host_va(), 0, 4);
m_printf_buffer->unmap_to_write(0, 4);
return CL_SUCCESS;
} else {
cvk_error_fn("Could not reset printf buffer");
}
cvk_error_fn("Could not reset printf buffer");
return CL_OUT_OF_RESOURCES;
return m_printf_buffer.get();
}

cvk_buffer* get_printf_buffer() {
Expand Down
1 change: 0 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/config)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/simple)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/simple-from-il-binary)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/simple-from-llvm-ir-binary)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/simple-concurrent)
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/sha1)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/simple-from-binary)
Expand Down

0 comments on commit 9a8f8ee

Please sign in to comment.