Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Gristmill is a tensor contraction optimizer and code generator built on top of t

**Project Type**: Python package with C++ extensions
**Size**: ~7k lines of Python code in main package
**Languages**: Python 3.12+, C++17
**Languages**: Python 3.12+, C++20
**Main Components**:
- `gristmill/optimize.py` - Core optimization algorithms
- `gristmill/generate.py` - Code generation and printers
- `gristmill/utils.py` - Utility functions including FLOP counting

**Key Dependencies**: drudge, sympy, numpy, networkx, jinja2
**Build Dependencies**: C++ compiler with C++17 support, Python setuptools
**Build Dependencies**: C++ compiler with C++20 support, Python setuptools

## Critical Setup Instructions

Expand Down Expand Up @@ -132,7 +132,7 @@ tests/

### C++ Compilation Errors
**Problem**: Extension build fails
**Solution**: Ensure C++ compiler supports C++17 and submodules are initialized.
**Solution**: Ensure C++ compiler supports C++20 and submodules are initialized.

## Key Facts for Code Changes

Expand Down
2 changes: 1 addition & 1 deletion deps/cpypp
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# Platform-specific compiler flags
if sys.platform == "win32":
# MSVC compiler flags
COMPILE_FLAGS = ['/std:c++17']
COMPILE_FLAGS = ['/std:c++20']
else:
# GCC/Clang compiler flags
COMPILE_FLAGS = ['-std=c++17']
COMPILE_FLAGS = ['-std=c++20']

# Additional flags for macOS to avoid header conflicts
if sys.platform == "darwin":
Expand Down
2 changes: 1 addition & 1 deletion tests/opt_cc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_ccsd_energy(parthole_drudge):
assert len(opt_eval_seq) == 2
opt_cost = get_flop_cost(opt_eval_seq)

assert (opt_cost - trav_cost).xreplace({p.no: 1, p.nv: 10}) > 0
assert (opt_cost - trav_cost).xreplace({p.no: 1, p.nv: 10}) >= 0


def test_ccsd_doubles(parthole_drudge):
Expand Down
Loading