-
Notifications
You must be signed in to change notification settings - Fork 60
Recreate python_frontend test_basic for nvfuser_direct #4521
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
base: direct_pt12
Are you sure you want to change the base?
Conversation
Review updated until commit c1b0ee3 Description
Changes walkthrough 📝
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
* `test_basic` is the first test from test_python_frontend. * Created check_captured_python_definition to check python repro. * Added `__repr__`, `define_scalar`, and `from_pytorch` to nvfuser_direct `FusionDefinition` Updated `python/python_next/ir.cpp` for `define_scalar`: 1. Created `define_scalar` binding 2. Added `is_symbolic` to `Val` binding Created `pytorch_utils.py` for `from_pytorch`: 1. Added `torch_dtype_to_nvfuser_dtype`
This PR creates the bindings for `FusionExecutorCache`, allowing fusions to run CUDA kernels in `nvfuser_direct`. Functions bound for `FusionExecutorCache`: * get_cuda_kernel * get_most_recent_scheduled_ir * get_scheduled_ir * is_compiled * execute Create `python/python_direct/direct_utils.h` for `python_direct`-only helper functions * Add `from_pyiterable` and `to_tensor_vector` to and from `at::Tensor` and `KernelArgumentHolder` New function for python `FusionDefinition`: * `execute` - It creates FusionExecutorCache if it exists and runs the fusion with given input arguments. Testing * Created `test_fusion_execution_cache` and `test_define_tensor` PR Stack: #4409 Create python FusionDefinition for nvfuser_next #4513 Add bindings for FusionExecutorCache **<<< This PR.** #4516 Add the remaining binary operations #4517 Add the bindings for unary operations #4518 Add the bindings for reduction operations #4519 Move helper functions from python_frontend to python_common #4520 Create python reproducer from Fusion IR for nvfuser_direct #4521 Recreate python_frontend test_basic for nvfuser_direct
This PR add the remaining binary operations in preparation for creating python reproducers from Fusion IR. PR Stack: #4513 Add bindings for FusionExecutorCache #4516 Add the remaining binary operations **<<< This PR.** #4517 Add the bindings for unary operations #4518 Add the bindings for reduction operations #4519 Move helper functions from python_frontend to python_common #4520 Create python reproducer from Fusion IR for nvfuser_direct #4521 Recreate python_frontend test_basic for nvfuser_direct
This PR recreates
test_basic
, which is the first test fromtest/python/test_python_frontend.py
.check_captured_python_definition
.New functions to nvfuser_direct
FusionDefinition
:__repr__
,define_scalar
, andfrom_pytorch
Updated
python/python_next/ir.cpp
fordefine_scalar
:define_scalar
bindingis_symbolic
toVal
bindingCreated
pytorch_utils.py
forfrom_pytorch
:torch_dtype_to_nvfuser_dtype
PR Stack:
#4513 Add bindings for FusionExecutorCache
#4516 Add the remaining binary operations
#4517 Add the bindings for unary operations
#4518 Add the bindings for reduction operations
#4519 Move helper functions from python_frontend to python_common
#4520 Create python reproducer from Fusion IR for nvfuser_direct
#4521 Recreate python_frontend test_basic for nvfuser_direct <<< This PR.