Skip to content

Commit bcb81e1

Browse files
Add libxinerama-dev, libxcursor-dev, libxi-dev, libgl-dev and libxcb-dev
1 parent b8b4c58 commit bcb81e1

File tree

6 files changed

+1522
-1190
lines changed

6 files changed

+1522
-1190
lines changed

.github/workflows/cmake-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
sudo apt-get update
3333
sudo apt-get install -y cmake
3434
sudo apt-get install -y libvulkan1 mesa-vulkan-drivers vulkan-tools
35-
sudo apt-get install -y libxrandr-dev
35+
sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libx11-xcb-dev
3636
3737
- name: Build with CMake
3838
run: CMAKE_VERBOSE_MAKEFILE=1 make all-cmake

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ endif()
1717
option(DEBUG "Option to enable debug flags" OFF)
1818
if(DEBUG)
1919
set(CMAKE_BUILD_TYPE Debug)
20-
set(CMAKE_CXX_FLAGS "-O0 -g")
20+
set(CMAKE_CXX_FLAGS "-O0 -g -fsanitize=address -fno-omit-frame-pointer")
2121
endif()
2222

2323
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/dawn.cmake")

cmake/dawn.cmake

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,7 @@ if(NOT DAWN_BUILD_FOUND)
101101
WORKING_DIRECTORY "${DAWN_DIR}"
102102
)
103103
execute_process(
104-
COMMAND git submodule init
105-
WORKING_DIRECTORY "${DAWN_DIR}"
106-
)
107-
execute_process(
108-
COMMAND git submodule update
104+
COMMAND git submodule update --init third_party/abseil-cpp
109105
WORKING_DIRECTORY "${DAWN_DIR}"
110106
)
111107
execute_process(

examples/hello_world/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ifeq ($(shell $(CXX) -std=c++17 -x c++ -E -include array - < /dev/null > /dev/nu
99
else
1010
STDLIB := -stdlib=libc++
1111
endif
12-
FLAGS=-std=c++17 $(STDLIB) -I$(GPUCPP) -I$(GPUCPP)/third_party/headers -I$(GPUCPP)/third_party/headers/webgpu -L$(GPUCPP)/third_party/lib run.cpp -ldl -lwebgpu_dawn
12+
FLAGS=-std=c++17 $(STDLIB) -I$(GPUCPP) -I$(GPUCPP)/third_party/headers -I$(GPUCPP)/third_party/headers/webgpu -L$(GPUCPP)/third_party/lib run.cpp -ldl -lwebgpu_dawn -Wl,-rpath,$(GPUCPP)/third_party/lib
1313

1414
run: ./build/$(TARGET) dawnlib
1515
$(LIBSPEC) && ./build/$(TARGET)
@@ -23,7 +23,7 @@ build/$(TARGET): run.cpp
2323
mkdir -p build && $(CXX) $(FLAGS) -DNO_LOG -o ./build/$(TARGET)
2424

2525
debug: run.cpp
26-
mkdir -p build && $(CXX) $(FLAGS) -g -o ./build/$(TARGET)
26+
mkdir -p build && $(CXX) $(FLAGS) -g -Wall -o ./build/$(TARGET)
2727

2828
clean:
2929
read -r -p "This will delete the contents of build/*. Are you sure? [CTRL-C to abort] " response && rm -rf build/*

test/test_gpu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ void testAddKernelInt8() {
194194
}
195195

196196
// These store the int8 data packed into i32 format on the GPU
197-
Tensor aTensorPacked = createTensor(ctx, Shape{N}, ki8, aInput.data());
198-
Tensor bTensorPacked = createTensor(ctx, Shape{N}, ki8, bInput.data());
197+
Tensor aTensorPacked = createTensor(ctx, Shape{N}, ki8, (const int8_t *)aInput.data());
198+
Tensor bTensorPacked = createTensor(ctx, Shape{N}, ki8, (const int8_t *)bInput.data());
199199
// Final output tensor, also in packed format
200200
Tensor outputTensorPacked = createTensor(ctx, Shape{N}, ki8);
201201

0 commit comments

Comments
 (0)