GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - p4lang/p4mlir-incubator: An experimental project to bring MLIR to P4C.

BranchesTags
Open more actions menu

Latest commit

 

History

416 Commits
416 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
LICENSES
LICENSES
 
 
build_tools
build_tools
 
 
include
include
 
 
lib
lib
 
 
test
test
 
 
third_party
third_party
 
 
tools
tools
 
 
.clang-format
.clang-format
 
 
.clang-tidy
.clang-tidy
 
 
.clangd
.clangd
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CPPLINT.cfg
CPPLINT.cfg
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

P4MLIR

WARNING: This is an experimental project in incubation, not ready for any serious use yet.

P4MLIR aims to explore leveraging MLIR in building P4 compilers.

P4MLIR is structured as both a standalone MLIR project, and a P4C extension. Once it's mature enough, the plan is to merge it into the P4C repo.

Developer guide

Build from source

Check out the code

git clone --recursive [email protected]:p4lang/p4mlir.git
cd p4mlir

If you forgot --recursive, additionally run:

git submodule update --init --recursive

Build MLIR from source

Install common LLVM/MLIR requirements following the instructions. Or use our script if you are on Ubuntu:

./build_tools/ubuntu_install_mlir_requirements.sh

Then build MLIR from source and install it:

./build_tools/build_mlir.sh

Sometimes this script will stop in the middle and report some failures. Re-running the script will continue the build process and usually go past the last failure. Eventually the build shall finish successfully.

Some MLIR regression tests have already been performed during the build process. If you want to run them again, do the following:

cd third_party/llvm-project/build
ninja check-mlir

IMPORTANT: P4C uses C++ RTTI and Exceptions. These are turned off by default in LLVM and therefore LLVM/MLIR prebuilt binaries that is likely available from your distribution will be not usable with P4MLIR. One needs to build LLVM/MLIR from source enabling RTTI (-DLLVM_ENABLE_RTTI=ON) and exceptions (-DLLVM_ENABLE_EH=ON).

Build P4C with P4MLIR extension from source

./build_tools/build_p4c_with_p4mlir_ext.sh

Testing

cd third_party/p4c/build
ninja check-p4mlir

About

An experimental project to bring MLIR to P4C.

web.archive.org/web/20241106215451/https://p4.org/wp-content/uploads/2024/11/204-P4-Workshop-P4HIR_-Towards-Bridging-P4C-with-MLIR-P4-Workshop-2024.pdf

Topics

mlirp4p4cp4lang

Resources

Readme
License

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

17 stars

Watchers

5 watching

Forks

26 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.