Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better macOS build support #11

Closed
wants to merge 482 commits into from
Closed

Better macOS build support #11

wants to merge 482 commits into from

Conversation

nsmithtt
Copy link
Contributor

macOS build support is still a wip, but this at least got through building the environment and finding Torch.

We still need to:

  • Get pybind to find Python.h in macOS framework include path
  • Build tt-mlir without runtime, tt-metal does not support mac build

jserbedzijaTT and others added 30 commits March 28, 2024 14:17
…d accumulatino data formats)

- Running currently tracked perf models as part of separated pipeline
- Focused on running combinations of bfp8_b and fp16_b as general data formats + fp16_b and fp32 as accumulation formats
- Some of the models are failing as they are currently not supported. Next issues will patch those one by one if needed
(cherry picked from commit ff0b7ad57544ce156af4e7919839f12abc711bbf)
(cherry picked from commit d9c7f954ae480800e602f31d779f6dbc084151b5)
(cherry picked from commit b4d3e494d6ede3c1ad8e7a13f03cda1121aebc36)
…sis.

(cherry picked from commit c892a1e1bcd23987791f9bf6e4e27f637f5a0b4d)
(cherry picked from commit 23a75120b7e68e38b0a72911e0eea20b2f39d71b)
(cherry picked from commit 99bf945e46bfb37b57333ae7eb8467c5f3c32a70)
(cherry picked from commit 61630b40b87c93cabaae9e67042ca92faa2c9385)
…k models that use data format bfp8_b

(cherry picked from commit 2d827b7a5f686ccfd1c981632eb0e21cd4afb819)
…k models that use data format bfp8_b

(cherry picked from commit de0025b545bfb34381bf004d92e40195d0a79e05)
…k models that use data format bfp8_b

(cherry picked from commit 9b27b7644e9d5d65f6e8ac45380c0350cbd4002f)
…i for benchmark models that use data format bfp8_b

(cherry picked from commit 3f777b375e314ffce8402273ef182a44a19db66c)
pilkicTT and others added 22 commits July 1, 2024 20:26
fixes linker issues when importing pybuda._C in python
Currently, we are opening devices on program startup
when registering TorchDeviceImpl. tt-metal doesn't like
when the device is left open. So if pybuda crashes,
next start up of pybuda will be stuck on trying to open
devices - to mitigate this, we need to reset the board(s)
manually.

This change ensures that we close devices on crash.
close device when handling signals

See merge request nvukobrat/pybuda-mlir-integration!1
Emitting PyBuda graph TTIR MLIR

See merge request nvukobrat/pybuda-mlir-integration!2
Initial set of op tests required to compile for MNIST inference

See merge request nvukobrat/pybuda-mlir-integration!3
…ary' into 'main'

Running MLIR passes and generating flatbuffer binary in PyBuda

See merge request nvukobrat/pybuda-mlir-integration!4
[api] initial work on new compile flow

See merge request nvukobrat/pybuda-mlir-integration!5
Integrating cmake

See merge request nvukobrat/pybuda-mlir-integration!7
[Training] MNIST Linear: Inference sample using torch.compile and training...

See merge request nvukobrat/pybuda-mlir-integration!8
Update README with build instructions for cmake
- moves device specific code from `tt_torch_device/` into `runtime/`
- adds `TTSystem` class (singleton) for holding all info
on present devices
- runs mlir compiler as a separate compile stage, which at the end
generates flatbuffer binary
- implements `CompiledModel` class for running inference on compiled
model
- `run_binary()` is the function which invokes tt-mlir runtime

NOTE: with this commit, the following tests are passing:
- pybuda/test/test_api.py
- pybuda/test/mlir/test_ops.py::test_add
- pybuda/test/mlir/test_ops.py::test_multiply
[runtime] initial support for running model on device
macOS build support is still a wip, but this at least got through
building the environment and finding Torch.

We still need to:
- Get pybind to find Python.h in macOS framework include path
- Build tt-mlir without runtime, tt-metal does not support mac build
@nsmithtt nsmithtt requested a review from mtopalovicTT July 24, 2024 18:17
@mtopalovicTT
Copy link
Contributor

Get pybind to find Python.h in macOS framework include path
Python3_INCLUDE_DIRS doesn't contain Python.h?

@nsmithtt
Copy link
Contributor Author

nsmithtt commented Aug 1, 2024

Closing for now, I'll revisit later.

@nsmithtt nsmithtt closed this Aug 1, 2024
@nsmithtt nsmithtt deleted the nsmith/macos-build branch August 1, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.