mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-26 23:04:57 +00:00
Added official examples from github.com/modular/modular: - gpu-intro, gpu-functions, gpu-block-and-warp (GPU programming) - layout_tensor, layouts (tensor operations) - life (Conway's Game of Life) - operators (custom operators) - process (subprocess handling) - python-interop (Python integration) - testing (unit test patterns) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
737 B
Python
45 lines
737 B
Python
load("//bazel:api.bzl", "mojo_binary", "mojo_library", "mojo_test")
|
|
|
|
package(default_visibility = ["//visibility:private"])
|
|
|
|
mojo_library(
|
|
name = "my_math",
|
|
srcs = glob(["src/my_math/*.mojo"]),
|
|
deps = [
|
|
"@mojo//:std",
|
|
],
|
|
)
|
|
|
|
mojo_binary(
|
|
name = "example",
|
|
srcs = ["src/example.mojo"],
|
|
deps = [
|
|
":my_math",
|
|
"@mojo//:std",
|
|
],
|
|
)
|
|
|
|
mojo_test(
|
|
name = "test_inc",
|
|
size = "small",
|
|
srcs = [
|
|
"test/my_math/test_inc.mojo",
|
|
],
|
|
deps = [
|
|
":my_math",
|
|
"@mojo//:std",
|
|
],
|
|
)
|
|
|
|
mojo_test(
|
|
name = "test_dec",
|
|
size = "small",
|
|
srcs = [
|
|
"test/my_math/test_dec.mojo",
|
|
],
|
|
deps = [
|
|
":my_math",
|
|
"@mojo//:std",
|
|
],
|
|
)
|