You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$(CMAKE_CMD)$(FASTBUILD_FLAGS)&& make -j$(NUM_JOBS)$(TARGET_DEMO)&& ./$(TARGET_DEMO)
29
22
30
-
# check for the existence of clang++ and cmake
31
-
check-dependencies:
32
-
@command -v clang++ >/dev/null 2>&1|| { echo>&2"Please install clang++ with 'sudo apt-get install clang' or 'brew install llvm'";exit 1; }
33
-
@command -v cmake >/dev/null 2>&1|| { echo>&2"Please install cmake with 'sudo apt-get install cmake' or 'brew install cmake'";exit 1; }
34
-
35
23
tests: check-dependencies
36
24
$(CMAKE_CMD)$(FASTBUILD_FLAGS)&& make -j$(NUM_JOBS)$(TARGET_TESTS)&& ./$(TARGET_TESTS)
37
25
@@ -41,43 +29,50 @@ libgpu: check-dependencies
41
29
debug: check-dependencies
42
30
$(CMAKE_CMD)$(DEBUG_FLAGS)&& make -j$(NUM_JOBS)$(TARGET_ALL)
43
31
44
-
debug-wgpu: check-dependencies
45
-
$(CMAKE_CMD)$(DEBUG_FLAGS)$(USE_WGPU)&& make -j$(NUM_JOBS)$(TARGET_ALL)
46
-
47
32
build: check-dependencies
48
33
$(CMAKE_CMD)$(RELEASE_FLAGS)&& make -j$(NUM_JOBS)$(TARGET_ALL)
49
34
50
-
emscripten: check-dependencies
51
-
$(CMAKE_CMD)$(EMSCRIPTEN_FLAGS) -DIMPLEMENTATION=emscripten && make -j$(NUM_JOBS)$(TARGET_ALL)
52
-
53
-
check-entr:
54
-
@command -v entr >/dev/null 2>&1|| { echo>&2"Please install entr with 'brew install entr' or 'sudo apt-get install entr'";exit 1; }
55
-
56
-
watch-demo: check-entr check-dependencies
57
-
$(CMAKE_CMD)$(FASTBUILD_FLAGS)&& ls ../* ../utils/*| entr -s "rm -f $(TARGET_DEMO) && make -j$(NUM_JOBS)$(TARGET_DEMO) && ./$(TARGET_DEMO)"
58
-
59
35
watch-tests: check-entr check-dependencies
60
36
$(CMAKE_CMD)$(FASTBUILD_FLAGS)&& ls ../utils/test_kernels.cpp ../*.h ../utils/*.h ../nn/*.h | entr -s "rm -f $(TARGET_TESTS) && make -j$(NUM_JOBS)$(TARGET_TESTS) && ./$(TARGET_TESTS)"
61
37
62
-
# experimental
63
-
watch-tests-wgpu: check-entr check-dependencies
64
-
# export RUST_TRACE=1
65
-
$(CMAKE_CMD)$(FASTBUILD_FLAGS)$(USE_WGPU)&& ls ../* ../utils/*| entr -s "rm -f $(TARGET_TESTS) && make -j$(NUM_JOBS)$(TARGET_TESTS) && ./$(TARGET_TESTS)"
66
-
67
-
watch-demo-local: check-entr check-dependencies
68
-
$(CMAKE_CMD)$(FASTBUILD_FLAGS)$(LOCAL_FLAGS)&& ls ../* ../utils/*| entr -s "rm -f $(TARGET_DEMO) && make -j$(NUM_JOBS)$(TARGET_DEMO) && ./$(TARGET_DEMO)"
69
-
70
-
watch-tests-local: check-entr check-dependencies
71
-
$(CMAKE_CMD)$(FASTBUILD_FLAGS)$(LOCAL_FLAGS)&& ls ../* ../utils/*| entr -s "rm -f $(TARGET_TESTS) && make -j$(NUM_JOBS)$(TARGET_TESTS) && ./$(TARGET_TESTS)"
38
+
all: build
39
+
cd examples/gpu_puzzles && make
40
+
cd examples/hello_world && make
41
+
cd examples/raymarch && make
42
+
cd examples/webgpu_intro && make
72
43
73
44
clean-build:
74
45
read -r -p "This will delete the contents of build/*. Are you sure? [CTRL-C to abort] " response && rm -rf build/*
75
46
76
47
clean:
77
48
read -r -p "This will delete the contents of build/* and third_party/*. Are you sure? [CTRL-C to abort] " response && rm -rf build/* third_party/fetchcontent/* third_party/gpu-build third_party/gpu-subbuild third_party/gpu-src
0 commit comments